diff options
author | Travis Howell | 2006-03-30 00:32:29 +0000 |
---|---|---|
committer | Travis Howell | 2006-03-30 00:32:29 +0000 |
commit | 014dde3de3519e0b386ae1c16c979bbf4a537489 (patch) | |
tree | 27d19a5054637c3f024bc607b4e9eac1d5a83a02 /engines | |
parent | 8cdee5a9310aecb0c8e39ceee4059b221d80ee0f (diff) | |
download | scummvm-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')
-rw-r--r-- | engines/scumm/he/script_v90he.cpp | 5 |
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) |