From 5c1aacc268a71b134889aada71ddc7b12c22c08a Mon Sep 17 00:00:00 2001 From: elasota Date: Sun, 5 Apr 2020 18:36:27 -0400 Subject: [PATCH] Fix memory corruption on victory screen --- GpApp/GameOver.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/GpApp/GameOver.cpp b/GpApp/GameOver.cpp index c1d4ff7..3caf2b6 100644 --- a/GpApp/GameOver.cpp +++ b/GpApp/GameOver.cpp @@ -162,6 +162,8 @@ void DoGameOverStarAnimation (void) PlayPrioritySound(kMysticSound, kMysticPriority); which = angelDest.left / 32; which = which % 5; + if (which < 0) + which += 5; ZeroRectCorner(&pages[which].dest); QOffsetRect(&pages[which].dest, angelDest.left, angelDest.bottom); if (count < (which + 1))