Fix check of the return value of findLocalObjectSlot() in loadFlObject()

svn-id: r17473
This commit is contained in:
Max Horn 2005-04-09 09:49:55 +00:00
parent cbe1437c27
commit 866e0c8613

View file

@ -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];