[Scummvm-cvs-logs] CVS: scummvm/scumm akos.cpp,1.102,1.103 script_v6.cpp,1.271,1.272

Travis Howell kirben at users.sourceforge.net
Thu Jan 15 22:17:03 CET 2004


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

Modified Files:
	akos.cpp script_v6.cpp 
Log Message:

Checks were a bit too strict, makes fatty bear completable.


Index: akos.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/akos.cpp,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -d -r1.102 -r1.103
--- akos.cpp	15 Jan 2004 02:59:51 -0000	1.102
+++ akos.cpp	16 Jan 2004 06:16:38 -0000	1.103
@@ -1252,7 +1252,7 @@
 			if (akfo == NULL)
 				error("akos_increaseAnim: no AKFO table");
 			tmp = a->getAnimVar(GB(2)) - 1;
-			if (tmp < 0 || tmp >= numakfo - 1)
+			if (tmp < 0 || tmp > numakfo - 1)
 				error("akos_increaseAnim: invalid jump value %d", tmp);
 			curpos = READ_LE_UINT16(&akfo[tmp]);
 			break;

Index: script_v6.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6.cpp,v
retrieving revision 1.271
retrieving revision 1.272
diff -u -d -r1.271 -r1.272
--- script_v6.cpp	16 Jan 2004 04:55:49 -0000	1.271
+++ script_v6.cpp	16 Jan 2004 06:16:38 -0000	1.272
@@ -411,7 +411,7 @@
 	// FIX THE FIXME: fixing an assert by commenting out is bad. It's evil.
 	// It's wrong. Find the proper cause, or at least, silently return
 	// from the function, but don't just go on overwriting memory!
-	assert(base >= 0 && base < ah->dim1_size * ah->dim2_size);
+	assert(base >= 0 && base <= ah->dim1_size * ah->dim2_size);
 
 	if (ah->type == 4) {
 		return ah->data[base];
@@ -428,7 +428,7 @@
 		return;
 	base += idx * ah->dim1_size;
 
-	assert(base >= 0 && base < ah->dim1_size * ah->dim2_size);
+	assert(base >= 0 && base <= ah->dim1_size * ah->dim2_size);
 
 	if (ah->type == 4) {
 		ah->data[base] = value;





More information about the Scummvm-git-logs mailing list