When we reached MAX_BOSS_TELEPORT_SEGS in init_boss_segments, make sure we also escape out of the for-loop - otherwise we still might overflow

This commit is contained in:
zicodxx 2008-11-20 02:09:01 +00:00
parent 335543283e
commit 58d1871199
2 changed files with 6 additions and 0 deletions

View file

@ -1,5 +1,9 @@
D1X-Rebirth Changelog
20081120
--------
main/ai.c: When we reached MAX_BOSS_TELEPORT_SEGS in init_boss_segments, make sure we also escape out of the for-loop - otherwise we still might overflow
20081119
--------
main/game.c: Actually demand ANY valid key to abort the Death sequence

View file

@ -1953,6 +1953,8 @@ void init_boss_segments(short segptr[], int *num_segs, int size_check)
#endif
if (*num_segs >= MAX_BOSS_TELEPORT_SEGS) {
tail = head;
sidenum=MAX_SIDES_PER_SEGMENT;
break;
}
}
}