aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2015-08-15 10:15:35 -0400
committerPaul Gilbert2015-08-15 10:15:35 -0400
commit68499c79c4831d6f4f3f61a9bf117a891a50cd4f (patch)
tree48b539d9f60ca6f67efb2b209e7d86e3d7be2041
parentc89fe9e123dcf59647c836b5a2dfaa3ce784ee71 (diff)
downloadscummvm-rg350-68499c79c4831d6f4f3f61a9bf117a891a50cd4f.tar.gz
scummvm-rg350-68499c79c4831d6f4f3f61a9bf117a891a50cd4f.tar.bz2
scummvm-rg350-68499c79c4831d6f4f3f61a9bf117a891a50cd4f.zip
SHERLOCK: RT: Fix hasAborts to return correct results
-rw-r--r--engines/sherlock/objects.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/sherlock/objects.cpp b/engines/sherlock/objects.cpp
index a2210cc7e2..d97d3122a0 100644
--- a/engines/sherlock/objects.cpp
+++ b/engines/sherlock/objects.cpp
@@ -105,14 +105,14 @@ bool BaseObject::hasAborts() const {
// If we've started checking and we've encountered another Talk or Listen Sequence Code,
// then we're done checking this sequence because this is where it would repeat
if (startChecking && (v == TALK_SEQ_CODE || v == TALK_LISTEN_CODE))
- return false;
+ break;
// See if we've found the beginning of a Talk Sequence
if ((v == TALK_SEQ_CODE && seqNum < 128) || (v == TALK_LISTEN_CODE && seqNum >= 128)) {
// If checking was already on and we came across one of these codes, then there couldn't
// have been an Allow Talk Interrupt code in the sequence we were checking, so we're done.
if (startChecking)
- return false;
+ break;
seqNum--;
// See if we're at the correct Talk Sequence Number
@@ -133,7 +133,7 @@ bool BaseObject::hasAborts() const {
}
} while (idx < _seqSize);
- return true;
+ return false;
}
void BaseObject::checkObject() {