[Scummvm-cvs-logs] SF.net SVN: scummvm:[45213] scummvm/trunk/engines/sci/engine/kstring.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Sun Oct 18 12:39:11 CEST 2009
Revision: 45213
http://scummvm.svn.sourceforge.net/scummvm/?rev=45213&view=rev
Author: thebluegr
Date: 2009-10-18 10:39:10 +0000 (Sun, 18 Oct 2009)
Log Message:
-----------
Added a sanity check in kStrAt()
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/kstring.cpp
Modified: scummvm/trunk/engines/sci/engine/kstring.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kstring.cpp 2009-10-18 10:32:08 UTC (rev 45212)
+++ scummvm/trunk/engines/sci/engine/kstring.cpp 2009-10-18 10:39:10 UTC (rev 45213)
@@ -292,6 +292,11 @@
reg_t kStrAt(EngineState *s, int argc, reg_t *argv) {
+ if (argv[0] == SIGNAL_REG) {
+ warning("Attempt to perform kStrAt() on a signal reg");
+ return NULL_REG;
+ }
+
SegmentRef dest_r = s->_segMan->dereference(argv[0]);
if (!dest_r.raw) {
warning("Attempt to StrAt at invalid pointer %04x:%04x", PRINT_REG(argv[0]));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list