From 58d1871199ecea209ddf197f7e4628c54cd6879d Mon Sep 17 00:00:00 2001 From: zicodxx <> Date: Thu, 20 Nov 2008 02:09:01 +0000 Subject: [PATCH] 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 --- CHANGELOG.txt | 4 ++++ main/ai.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 00a63f9cc..d80428ed5 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -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 diff --git a/main/ai.c b/main/ai.c index 9e7ca1570..aafedf089 100644 --- a/main/ai.c +++ b/main/ai.c @@ -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; } } }