[Scummvm-cvs-logs] CVS: scummvm/scumm/smush insane.cpp,1.28,1.29

Torbj?rn Andersson eriktorbjorn at users.sourceforge.net
Sun Dec 28 07:51:01 CET 2003


Update of /cvsroot/scummvm/scummvm/scumm/smush
In directory sc8-pr-cvs1:/tmp/cvs-serv12340

Modified Files:
	insane.cpp 
Log Message:
This could be wrong so feel free to revert, but it does seem to fix crashes
in the Mine Road sequence of Full Throttle for me.

The crashes were always in proc64(), with 'en' being some ridiculously
large value. The function, as it was written, did not make any sense to me
so I rewrote it with the assumption that it's there to remove the "en"th
element of the _val216d[] (remaining enemies?) array.

I don't know how well it will work from proc63() if there's more than one
element to remove - at least if the elements to remove are neighbours - but
maybe that case never happens.


Index: insane.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/insane.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- insane.cpp	28 Dec 2003 07:57:36 -0000	1.28
+++ insane.cpp	28 Dec 2003 15:50:10 -0000	1.29
@@ -7780,12 +7780,10 @@
 }
 
 void Insane::proc64(int32 enemy1) {
-	int en = _val215d;
+	_val215d--;
 
-	for (en = _val215d; enemy1 < en; en++)
+	for (int en = enemy1; en < _val215d; en++)
 		_val216d[en] = _val216d[en + 1];
-
-	_val215d = en - 1;
 }
 
 void Insane::iactScene3(byte *renderBitmap, int32 codecparam, int32 setupsan12,





More information about the Scummvm-git-logs mailing list