[Scummvm-cvs-logs] SF.net SVN: scummvm:[54415] scummvm/trunk/engines/sci/engine/object.cpp
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Mon Nov 22 11:23:54 CET 2010
Revision: 54415
http://scummvm.svn.sourceforge.net/scummvm/?rev=54415&view=rev
Author: thebluegr
Date: 2010-11-22 10:23:53 +0000 (Mon, 22 Nov 2010)
Log Message:
-----------
SCI: Fixed bug #3044050 - "SQ4FLOPPY: Crash while flying in Skate-o-Rama"
Fixed Object::locateVarSelector() for SCI0-SCI1 games, as it wasn't checking the
class for object variables
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/object.cpp
Modified: scummvm/trunk/engines/sci/engine/object.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/object.cpp 2010-11-22 00:20:00 UTC (rev 54414)
+++ scummvm/trunk/engines/sci/engine/object.cpp 2010-11-22 10:23:53 UTC (rev 54415)
@@ -91,13 +91,9 @@
const byte *buf = 0;
uint varnum = 0;
- if (getSciVersion() <= SCI_VERSION_1_LATE) {
- varnum = getVarCount();
- int selector_name_offset = varnum * 2 + kOffsetSelectorSegment;
- buf = _baseObj + selector_name_offset;
- } else if (getSciVersion() >= SCI_VERSION_1_1 && getSciVersion() <= SCI_VERSION_2_1) {
+ if (getSciVersion() <= SCI_VERSION_2_1) {
const Object *obj = getClass(segMan);
- varnum = obj->getVariable(1).toUint16();
+ varnum = getSciVersion() <= SCI_VERSION_1_LATE ? getVarCount() : obj->getVariable(1).toUint16();
buf = (const byte *)obj->_baseVars;
} else if (getSciVersion() == SCI_VERSION_3) {
varnum = _variables.size();
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