Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#70 [lbreakout2] [PATCH] fix infinite loop in "Hunter" bonus lvl

open
nobody
None
5
2012-04-07
2012-04-07
Maarten Bressers
No

Hi,

In the "Hunter" (LT_HUNTER) bonus level, sometimes lbreakout2 will enter an infinite loop (in game/bricks.c:377, function bricks_create_new_prey()), when trying to position a new "prey". As I see it, if the new position chosen for the prey happens to be the current position of the hunter, the third subcondition of the while{} causes it to loop forever. This has happened to me on a number of occasions, so I've created a very simple patch to make sure it doesn't happen anymore :) The patch (see attached) is against the latest source (v2.6.3), and as far as I can see, fixes the problem.

If you want something changed or tested or have any questions, please let me know.

Discussion