[Scummvm-cvs-logs] CVS: scummvm/scumm script_v72he.cpp,2.256,2.257 script_v80he.cpp,2.93,2.94
kirben
kirben at users.sourceforge.net
Fri Apr 15 22:36:34 CEST 2005
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30930/scumm
Modified Files:
script_v72he.cpp script_v80he.cpp
Log Message:
Adjust for footdemo, which triggers assert.
Index: script_v72he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v72he.cpp,v
retrieving revision 2.256
retrieving revision 2.257
diff -u -d -r2.256 -r2.257
--- script_v72he.cpp 14 Apr 2005 06:06:58 -0000 2.256
+++ script_v72he.cpp 16 Apr 2005 05:36:01 -0000 2.257
@@ -2161,7 +2161,7 @@
const byte *ptr = getResourceAddress(rtSound, resid);
assert(ptr);
- size = READ_BE_UINT32(ptr + 4) - 8;
+ size = getResourceDataSize(ptr);
push(size);
}
Index: script_v80he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v80he.cpp,v
retrieving revision 2.93
retrieving revision 2.94
diff -u -d -r2.93 -r2.94
--- script_v80he.cpp 14 Apr 2005 06:06:58 -0000 2.93
+++ script_v80he.cpp 16 Apr 2005 05:36:01 -0000 2.94
@@ -839,8 +839,13 @@
}
const byte *ptr = getResourceAddress(type, resid);
- assert(ptr);
- size = READ_BE_UINT32(ptr + 4) - 8;
+ if (ptr) {
+ size = getResourceDataSize(ptr);
+ } else {
+ debug(0, "o80_getResourceSize: invalid resource type %d id %d", type, resid);
+ size = 0;
+ }
+
push(size);
}
More information about the Scummvm-git-logs
mailing list