X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fpacman_level.c;h=f26b3bfe120b0e0681f7e833a57cfef0398e5869;hp=d617942cf4613c057aa03164052e9a7f5a79ebe7;hb=4ade52359b6eba3621566dac79793a33aa4c915f;hpb=ff35d056d723c9a5ffe728dbba5f1c25e141be04 diff --git a/hacks/pacman_level.c b/hacks/pacman_level.c index d617942c..f26b3bfe 100644 --- a/hacks/pacman_level.c +++ b/hacks/pacman_level.c @@ -539,7 +539,7 @@ pacman_is_bonus_dot (pacmangamestruct *pp, int x, int y, int *idx) { int ret = False; int i; - for (i = 0; i <= NUM_BONUS_DOTS; i++) { + for (i = 0; i < NUM_BONUS_DOTS; i++) { /* fprintf(stderr,"is bonus: passed x (%d, %d) bonus (%d, %d)\n",x,y,bonus_dots[i].x, bonus_dots[i].y); */ if (x == pp->bonus_dots[i].x && y == pp->bonus_dots[i].y) { ret = True; @@ -553,7 +553,7 @@ pacman_is_bonus_dot (pacmangamestruct *pp, int x, int y, int *idx) static void check_bonus_idx (int idx) { - assert (0 <= idx && idx <= NUM_BONUS_DOTS); + assert (0 <= idx && idx < NUM_BONUS_DOTS); } int