aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Brown2003-01-12 16:34:05 +0000
committerJames Brown2003-01-12 16:34:05 +0000
commitf8dce1dc1f6d29487c90a5e24db3bff32d4f7698 (patch)
treec0a1ef44cb09a998011272baf3e9e535f5f0fc02
parentdfced2a4d0663889f755e9efea476ed2a157c1ec (diff)
downloadscummvm-rg350-f8dce1dc1f6d29487c90a5e24db3bff32d4f7698.tar.gz
scummvm-rg350-f8dce1dc1f6d29487c90a5e24db3bff32d4f7698.tar.bz2
scummvm-rg350-f8dce1dc1f6d29487c90a5e24db3bff32d4f7698.zip
Fix ComI inventory crash, properly.
svn-id: r6430
-rw-r--r--scumm/script_v8.cpp6
-rw-r--r--scumm/scummvm.cpp2
2 files changed, 4 insertions, 4 deletions
diff --git a/scumm/script_v8.cpp b/scumm/script_v8.cpp
index aec55bb5b4..f00e8c8232 100644
--- a/scumm/script_v8.cpp
+++ b/scumm/script_v8.cpp
@@ -1471,8 +1471,10 @@ void Scumm_v8::o8_kernelGetFunctions()
eo = &_enqueuedObjects[i];
if (eo->posX <= args[1] && eo->width + eo->posX > args[1] &&
eo->posY <= args[2] && eo->height + eo->posY > args[2]) {
- push(eo->number);
- return;
+ if (!getClass(eo->number, 32)) {
+ push(eo->number);
+ return;
+ }
}
}
diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp
index 83b49cbca4..cb8f1d8cb7 100644
--- a/scumm/scummvm.cpp
+++ b/scumm/scummvm.cpp
@@ -575,8 +575,6 @@ int Scumm::scummLoop(int delta)
_system->show_mouse(_cursor.state > 0);
_vars[VAR_TIMER] = 0;
- if (_features & GF_AFTER_V8)
- _vars[300] = 0; // FIXME - this fixes an inventory crash. But is it correct this way?
return _vars[VAR_TIMER_NEXT];
}