Bug#443822: I've found a fix
Gerfried Fuchs
rhonda at deb.at
Mon Dec 17 10:11:44 UTC 2007
* Roland Clobus <rclobus at bigfoot.com> [2007-12-16 14:11:52 CET]:
> I have found a fix for the crashes (Most of them happen on complex laser
> levels).
Great!!
> This fix will bring currentStage back into range after a call to
> Reset(double t)
>
> The attached patch is written on the fully patched source code.
Hmm, I wonder:
> --- hex_puzzzle.cpp 2007-12-16 13:19:47.000000000 +0100
> +++ hex_puzzle.fixed.cpp 2007-12-16 13:19:05.000000000 +0100
> @@ -602,6 +602,9 @@
> {
> while (numStages > 0 && time[numStages-1] >= t)
> numStages--;
> + if (currentStage > 0 && currentStage >= numStages) {
> + currentStage = numStages - 1;
> + }
Isn't it possible for numStages to come to zero in the while loop,
making currentStage ending up with -1 in the if?
So long,
Rhonda
More information about the Pkg-games-devel
mailing list