aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/object.cpp
diff options
context:
space:
mode:
authorMax Horn2008-09-23 11:43:57 +0000
committerMax Horn2008-09-23 11:43:57 +0000
commit618e7f3e313c406a97876e83e1665bfa415e4340 (patch)
tree15e10b0ee9654cfeb03a3c3b6d1ec9523520478e /engines/scumm/object.cpp
parent65ef827349870eac5072d9a104b8a2d7ebc3ef07 (diff)
downloadscummvm-rg350-618e7f3e313c406a97876e83e1665bfa415e4340.tar.gz
scummvm-rg350-618e7f3e313c406a97876e83e1665bfa415e4340.tar.bz2
scummvm-rg350-618e7f3e313c406a97876e83e1665bfa415e4340.zip
Fix for bug #1917981: Game crash when finishing Indy3 demo. At the same time, added a new paranoia check
svn-id: r34635
Diffstat (limited to 'engines/scumm/object.cpp')
-rw-r--r--engines/scumm/object.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/engines/scumm/object.cpp b/engines/scumm/object.cpp
index 8bcd92fd3b..eaffbd04bb 100644
--- a/engines/scumm/object.cpp
+++ b/engines/scumm/object.cpp
@@ -109,6 +109,13 @@ void ScummEngine::setOwnerOf(int obj, int owner) {
int arg = (_game.version >= 6) ? obj : 0;
+ // WORKAROUND for bug #1917981: Game crash when finishing Indy3 demo.
+ // Script 94 tries to empty the inventory but does so in a bogus way.
+ // This causes it to try to remove object 0 from the inventory.
+ if (_game.id == GID_PASS && obj == 0 && vm.slot[_currentScript].number == 94)
+ return;
+ assert(obj > 0);
+
if (owner == 0) {
clearOwnerOf(obj);