diff options
author | Filippos Karapetis | 2008-01-03 10:42:18 +0000 |
---|---|---|
committer | Filippos Karapetis | 2008-01-03 10:42:18 +0000 |
commit | 2bb81e2d207201265273e36bff8fadaeba6444a1 (patch) | |
tree | c2d0efc7e826e487e021ef3b5eba02561133bf05 /engines/saga | |
parent | e75207d9d7d60b11c7a5dac769c981e80d244618 (diff) | |
download | scummvm-rg350-2bb81e2d207201265273e36bff8fadaeba6444a1.tar.gz scummvm-rg350-2bb81e2d207201265273e36bff8fadaeba6444a1.tar.bz2 scummvm-rg350-2bb81e2d207201265273e36bff8fadaeba6444a1.zip |
Properly fixed bug #1861863 - "ITE: Crash when using Eeah with Eeah"
svn-id: r30195
Diffstat (limited to 'engines/saga')
-rw-r--r-- | engines/saga/sfuncs.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/engines/saga/sfuncs.cpp b/engines/saga/sfuncs.cpp index b4bc551316..9a8c865612 100644 --- a/engines/saga/sfuncs.cpp +++ b/engines/saga/sfuncs.cpp @@ -396,6 +396,13 @@ void Script::sfScriptDoAction(SCRIPTFUNC_PARAMS) { const HitZone *hitZone; Event event; + // If the player uses an object and then immediately reuses that object + // (without it being shown in the verb area), the object returned is wrong (0), + // so we make it equal to the second object here. + // Fixes bug #1861863 - "ITE: Crash when using Eeah with Eeah" + if (theObject == 0 && objectId == 0 && withObject > 0) + theObject = objectId = withObject; + switch (objectTypeId(objectId)) { case kGameObjectObject: obj = _vm->_actor->getObj(objectId); @@ -436,8 +443,6 @@ void Script::sfScriptDoAction(SCRIPTFUNC_PARAMS) { break; default: // Unknown case, do nothing - // Changing this from an error to a warning should fix bug - // #1861863 - "ITE: Crash when using Eeah with Eeah" warning("Script::sfScriptDoAction wrong object type 0x%X", objectId); return; } |