Skip to content

Commit

Permalink
MOHAWK: A zero matchFrom matches everything.
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzzie committed Feb 20, 2011
1 parent 2f312e9 commit 9fa6b48
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions engines/mohawk/livingbooks.cpp
Expand Up @@ -1880,8 +1880,8 @@ LBScriptEntry *LBItem::parseScriptEntry(uint16 type, uint16 &size, Common::Seeka
error("not enough bytes (%d) in kLBEventNotified, opcode 0x%04x", size, entry->opcode);
entry->matchFrom = stream->readUint16();
entry->matchNotify = stream->readUint16();
debug(4, "kLBEventNotified: unknowns %04x, %04x",
entry->matchFrom, entry->matchNotify);
debug(4, "kLBEventNotified: matches %04x (from %04x)",
entry->matchNotify, entry->matchFrom);
size -= 4;
}

Expand Down Expand Up @@ -2289,7 +2289,7 @@ void LBItem::runScript(uint event, uint16 data, uint16 from) {
continue;

if (event == kLBEventNotified) {
if (entry->matchFrom != from || entry->matchNotify != data)
if ((entry->matchFrom && entry->matchFrom != from) || entry->matchNotify != data)
continue;
}

Expand Down

0 comments on commit 9fa6b48

Please sign in to comment.