[Scummvm-cvs-logs] CVS: scummvm/scumm resource.cpp,1.346,1.347
Gregory Montoir
cyx at users.sourceforge.net
Sat Oct 22 03:42:44 CEST 2005
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12623
Modified Files:
resource.cpp
Log Message:
This apparently fixes a crash in 'PuttPutt enters the Race'. Thanks Dark-Star. Also added some assert() calls.
Index: resource.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/resource.cpp,v
retrieving revision 1.346
retrieving revision 1.347
diff -u -d -r1.346 -r1.347
--- resource.cpp 21 Oct 2005 15:26:57 -0000 1.346
+++ resource.cpp 22 Oct 2005 10:41:28 -0000 1.347
@@ -484,11 +484,13 @@
// Names of rooms. Maybe we should put them into a table, for use by the debugger?
if (_heversion >= 80) {
for (int room; (room = _fileHandle->readUint16LE()); ) {
- char buf[20];
+ char buf[30];
i = 0;
for (byte s; (s = _fileHandle->readByte()); ) {
+ assert(i < ARRAYSIZE(buf));
buf[i++] = s;
}
+ assert(i < ARRAYSIZE(buf));
buf[i] = 0;
debug(5, "Room %d: '%s'", room, buf);
}
More information about the Scummvm-git-logs
mailing list