[Scummvm-cvs-logs] CVS: scummvm/scumm charset.cpp,2.23,2.24 resource.cpp,1.65,1.66

Max Horn fingolfin at users.sourceforge.net
Thu May 1 04:04:06 CEST 2003


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

Modified Files:
	charset.cpp resource.cpp 
Log Message:
Fixed bug #730030: INDY3: Crash when loading new savegames

Index: charset.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/charset.cpp,v
retrieving revision 2.23
retrieving revision 2.24
diff -u -d -r2.23 -r2.24
--- charset.cpp	30 Apr 2003 10:27:06 -0000	2.23
+++ charset.cpp	1 May 2003 11:03:41 -0000	2.24
@@ -29,7 +29,9 @@
 	_curId = id;
 
 	_fontPtr = _vm->getResourceAddress(rtCharset, id);
-	assert(_fontPtr);
+	if (_fontPtr == 0)
+		error("CharsetRendererCommon::setCurID: charset %d not found!\n", id);
+
 	if (_vm->_features & GF_AFTER_V3) {
 		_nbChars = _fontPtr[4];
 		_fontPtr += 6 + _nbChars;

Index: resource.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/resource.cpp,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -d -r1.65 -r1.66
--- resource.cpp	30 Apr 2003 13:23:29 -0000	1.65
+++ resource.cpp	1 May 2003 11:03:41 -0000	1.66
@@ -558,7 +558,10 @@
 		i = _resourceMapper[i & 0x7F];
 	}
 
-	if (i == 0)
+	// FIXME - TODO: This check used to be "i==0". However, that causes
+	// problems when using this function to ensure charset 0 is loaded.
+	// Quesetion: Why was this check like that in the first place?
+	if (i < 0)
 		return;
 
 	if (i <= res.num[type])





More information about the Scummvm-git-logs mailing list