From 789d4fb0ea6cb3ed53e40100a146205511de1cbc Mon Sep 17 00:00:00 2001 From: Clownacy Date: Wed, 15 Jul 2020 16:35:05 +0100 Subject: [PATCH] Fix another out-of-bounds array access This one involves the Spur. --- src/Bullet.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Bullet.cpp b/src/Bullet.cpp index 68a369ea..0850735f 100644 --- a/src/Bullet.cpp +++ b/src/Bullet.cpp @@ -2179,7 +2179,12 @@ void ActBullet_SpurTail(BULLET *bul, int level) bul->ani_no = bul->count1 - 20; if (bul->ani_no > 2) + { bul->cond = 0; + #ifdef FIX_BUGS + return; // Avoid accessing the RECT arrays with an out-of-bounds index + #endif + } if (bul->damage && bul->life != 100) bul->damage = 0;