From 66a709ad2ab1c867bb1b6f953c558dd451fc95cc Mon Sep 17 00:00:00 2001 From: elasota Date: Wed, 1 Apr 2020 23:29:48 -0400 Subject: [PATCH] Fix memory corruption --- 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))