diff options
| author | Willem Jan Palenstijn | 2011-05-13 23:01:02 +0200 |
|---|---|---|
| committer | Willem Jan Palenstijn | 2011-05-13 23:29:05 +0200 |
| commit | 7b2792328153024ef8ffd23050393ddb3098f6b0 (patch) | |
| tree | d3634c8b346ce2d286c940534adc3bb5b2a7d8b9 /engines/sci/engine/gc.cpp | |
| parent | cb8460e92669da540eb54b80c249a7ba1f7df45a (diff) | |
| download | scummvm-rg350-7b2792328153024ef8ffd23050393ddb3098f6b0.tar.gz scummvm-rg350-7b2792328153024ef8ffd23050393ddb3098f6b0.tar.bz2 scummvm-rg350-7b2792328153024ef8ffd23050393ddb3098f6b0.zip | |
SCI: Avoid incrementing lockers of deleted script
Having a deleted script with non-zero lockers had the side effect of
making the deleted script re-appear in the GC's work list, including
any (deleted) objects in the script.
This should be the root cause of bugs #3299458 and #3295849, so
also delete the workaround added for that in be5d448d.
(cherry picked from commit c01fed7159c313680e55458efb6529d332ebc8b0)
Diffstat (limited to 'engines/sci/engine/gc.cpp')
| -rw-r--r-- | engines/sci/engine/gc.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/engines/sci/engine/gc.cpp b/engines/sci/engine/gc.cpp index b1d461c561..e395eeab94 100644 --- a/engines/sci/engine/gc.cpp +++ b/engines/sci/engine/gc.cpp @@ -90,14 +90,7 @@ static void processWorkList(SegManager *segMan, WorklistManager &wm, const Commo wm._worklist.pop_back(); if (reg.segment != stackSegment) { // No need to repeat this one debugC(kDebugLevelGC, "[GC] Checking %04x:%04x", PRINT_REG(reg)); - // WORKAROUND: We only check for valid offsets here. Fixes bugs - // #3299458 and #3295849. - // FIXME: Where are these invalid offsets coming from? The check - // below avoids a crash when examining invalid references, but the - // root of the problem lies elsewhere. These shouldn't be in the - // stack at all (unless these really are script bugs, in which case - // we should just keep the sanity check). - if (reg.segment < heap.size() && heap[reg.segment] && heap[reg.segment]->isValidOffset(reg.offset)) { + if (reg.segment < heap.size() && heap[reg.segment]) { // Valid heap object? Find its outgoing references! wm.pushArray(heap[reg.segment]->listAllOutgoingReferences(reg)); } |
