[Scummvm-cvs-logs] CVS: scummvm/scumm resource.cpp,1.130,1.131

Jonathan Gray khalek at users.sourceforge.net
Thu Aug 14 22:44:26 CEST 2003


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

Modified Files:
	resource.cpp 
Log Message:
add hack for string resource idx numbers greater than max for humongous games

Index: resource.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/resource.cpp,v
retrieving revision 1.130
retrieving revision 1.131
diff -u -d -r1.130 -r1.131
--- resource.cpp	14 Aug 2003 10:46:46 -0000	1.130
+++ resource.cpp	15 Aug 2003 05:35:12 -0000	1.131
@@ -1644,6 +1644,13 @@
 	if (!res.address[type])
 		return;
 
+	// FIXME hack around insanely high string resource idx's
+	if ((_features & GF_HUMONGOUS) && (type == 7 && idx > res.num[7])) {
+		warning("nukeResource: type %d index %d > max %d", type, idx,
+				res.num[7]);
+		return;
+	}
+
 	assert(idx >= 0 && idx < res.num[type]);
 
 	if ((ptr = res.address[type][idx]) != NULL) {





More information about the Scummvm-git-logs mailing list