[Scummvm-cvs-logs] CVS: scummvm/scumm script_v6.cpp,1.306,1.307
Max Horn
fingolfin at users.sourceforge.net
Wed Feb 18 02:52:14 CET 2004
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8584
Modified Files:
script_v6.cpp
Log Message:
Add some safety checks
Index: script_v6.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6.cpp,v
retrieving revision 1.306
retrieving revision 1.307
diff -u -d -r1.306 -r1.307
--- script_v6.cpp 18 Feb 2004 04:21:19 -0000 1.306
+++ script_v6.cpp 18 Feb 2004 10:42:26 -0000 1.307
@@ -2706,6 +2706,8 @@
if (args[1] != -1 && args[2] != -1) {
VirtScreen *vs = &virtscr[0];
+ assert(0 <= args[1] && args[1] < vs->width);
+ assert(0 <= args[2] && args[2] < vs->height);
push(vs->screenPtr[args[1] + args[2] * vs->width]);
} else
push(0);
@@ -3080,6 +3082,8 @@
return;
}
+ // FIXME: Actually, there is only one virtscr in V7/V8 games anyway.
+ // And topline is always 0 for it.
VirtScreen *vs = findVirtScreen(y);
if (vs == NULL) {
More information about the Scummvm-git-logs
mailing list