[Scummvm-cvs-logs] SF.net SVN: scummvm:[45537] scummvm/trunk/engines/sci/engine/kstring.cpp
m_kiewitz at users.sourceforge.net
m_kiewitz at users.sourceforge.net
Fri Oct 30 15:22:33 CET 2009
Revision: 45537
http://scummvm.svn.sourceforge.net/scummvm/?rev=45537&view=rev
Author: m_kiewitz
Date: 2009-10-30 14:22:22 +0000 (Fri, 30 Oct 2009)
Log Message:
-----------
SCI: kStrAt offset checking fixed
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-30 12:33:05 UTC (rev 45536)
+++ scummvm/trunk/engines/sci/engine/kstring.cpp 2009-10-30 14:22:22 UTC (rev 45537)
@@ -308,12 +308,14 @@
if (argc > 2)
newvalue = argv[2].toSint16();
+ // in kq5 this here gets called with offset 0xFFFF
+ // (in the desert wheng getting the staff)
+ if ((int)offset >= dest_r.maxSize) {
+ warning("kStrAt offset %X exceeds maxSize", offset);
+ return s->r_acc;
+ }
+
if (dest_r.isRaw) {
- // in kq5 this here gets called with offset 0xFFFF
- if ((int)offset > dest_r.maxSize) {
- warning("kStrAt offset %X exceeds maxSize", offset);
- return s->r_acc;
- }
value = dest_r.raw[offset];
if (argc > 2) /* Request to modify this char */
dest_r.raw[offset] = newvalue;
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