[Scummvm-cvs-logs] CVS: scummvm/scumm resource.cpp,1.347,1.348
Gregory Montoir
cyx at users.sourceforge.net
Sat Oct 22 03:50:09 CEST 2005
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13738
Modified Files:
resource.cpp
Log Message:
As Kirben suggested, increasing room name buffer
Index: resource.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/resource.cpp,v
retrieving revision 1.347
retrieving revision 1.348
diff -u -d -r1.347 -r1.348
--- resource.cpp 22 Oct 2005 10:41:28 -0000 1.347
+++ resource.cpp 22 Oct 2005 10:48:14 -0000 1.348
@@ -484,13 +484,11 @@
// 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[30];
+ char buf[100];
i = 0;
- for (byte s; (s = _fileHandle->readByte()); ) {
- assert(i < ARRAYSIZE(buf));
+ for (byte s; (s = _fileHandle->readByte()) && i < ARRAYSIZE(buf) - 1; ) {
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