aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorMax Horn2005-04-09 09:49:55 +0000
committerMax Horn2005-04-09 09:49:55 +0000
commit866e0c8613375f997619b051f5ed81ff94ecd2a2 (patch)
treec1db673c68ea804e9adeb741504cb47aa8adfbd9 /scumm
parentcbe1437c27f22714cd730e77021f042ace34b530 (diff)
downloadscummvm-rg350-866e0c8613375f997619b051f5ed81ff94ecd2a2.tar.gz
scummvm-rg350-866e0c8613375f997619b051f5ed81ff94ecd2a2.tar.bz2
scummvm-rg350-866e0c8613375f997619b051f5ed81ff94ecd2a2.zip
Fix check of the return value of findLocalObjectSlot() in loadFlObject()
svn-id: r17473
Diffstat (limited to 'scumm')
-rw-r--r--scumm/object.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/scumm/object.cpp b/scumm/object.cpp
index f5d6caf65a..d5e18e72cc 100644
--- a/scumm/object.cpp
+++ b/scumm/object.cpp
@@ -1634,7 +1634,8 @@ void ScummEngine::loadFlObject(uint object, uint room) {
findObjectInRoom(&foir, foImageHeader | foCodeHeader, object, room);
// Add an entry for the new floating object in the local object table
- if (!(objslot = findLocalObjectSlot()))
+ objslot = findLocalObjectSlot();
+ if (objslot == -1)
error("loadFlObject: Local Object Table overflow");
od = &_objs[objslot];