aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorTravis Howell2006-03-30 00:32:29 +0000
committerTravis Howell2006-03-30 00:32:29 +0000
commit014dde3de3519e0b386ae1c16c979bbf4a537489 (patch)
tree27d19a5054637c3f024bc607b4e9eac1d5a83a02 /engines/scumm
parent8cdee5a9310aecb0c8e39ceee4059b221d80ee0f (diff)
downloadscummvm-rg350-014dde3de3519e0b386ae1c16c979bbf4a537489.tar.gz
scummvm-rg350-014dde3de3519e0b386ae1c16c979bbf4a537489.tar.bz2
scummvm-rg350-014dde3de3519e0b386ae1c16c979bbf4a537489.zip
Add missing check for invalid object number in getObjectData opcode
svn-id: r21501
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/he/script_v90he.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/scumm/he/script_v90he.cpp b/engines/scumm/he/script_v90he.cpp
index 3759cf7b88..61fc1d5f30 100644
--- a/engines/scumm/he/script_v90he.cpp
+++ b/engines/scumm/he/script_v90he.cpp
@@ -2347,7 +2347,10 @@ void ScummEngine_v90he::o90_getObjectData() {
push(_objs[_heObjectNum].height);
break;
case 4:
- push(getObjectImageCount(_heObject));
+ if (_heObjectNum == -1)
+ push(0);
+ else
+ push(getObjectImageCount(_heObject));
break;
case 6:
if (_heObjectNum == -1)