Ticket #8438: scummvm-findInRoomFix.diff

File scummvm-findInRoomFix.diff, 689 bytes (added by SF/albeu, 15 years ago)

patch

  • scumm/object.cpp

    RCS file: /cvsroot/scummvm/scummvm/scumm/object.cpp,v
    retrieving revision 1.243
    diff -u -r1.243 object.cpp
     
    11821182        int id2;
    11831183        int obim_id;
    11841184
    1185         if (findWhat & foCheckAlreadyLoaded && getObjectIndex(id) != -1) {
     1185        if (findWhat & foCheckAlreadyLoaded && (i = getObjectIndex(id)) != -1 && _objs[i].fl_object_index) {
    11861186                if (_features & GF_OLD_BUNDLE) {
    11871187                        // I am not sure if this is even needed for old games...
    11881188                        // but using READ_BE_UINT32 below to determine the resource size