Fix another out-of-bounds array access

This one involves the Spur.
This commit is contained in:
Clownacy 2020-07-15 16:35:05 +01:00
parent f7a8a260a4
commit 6fd6a416cd

View file

@ -2179,7 +2179,12 @@ void ActBullet_SpurTail(BULLET *bul, int level)
bul->ani_no = bul->count1 - 20; bul->ani_no = bul->count1 - 20;
if (bul->ani_no > 2) if (bul->ani_no > 2)
{
bul->cond = 0; 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) if (bul->damage && bul->life != 100)
bul->damage = 0; bul->damage = 0;