shithub: cstory

Download patch

ref: 6fd6a416cde2aaf8a62480cf83748dbdecd4762f
parent: f7a8a260a416c8d0d07ba77e7faafda867741a43
author: Clownacy <Clownacy@users.noreply.github.com>
date: Wed Jul 15 12:35:05 EDT 2020

Fix another out-of-bounds array access

This one involves the Spur.

--- a/src/Bullet.cpp
+++ b/src/Bullet.cpp
@@ -2179,7 +2179,12 @@
 		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;