From 9fa6b48e1ae574c0af5be3ed2f9815c3d98be655 Mon Sep 17 00:00:00 2001 From: Alyssa Milburn Date: Sun, 20 Feb 2011 13:42:40 +0100 Subject: MOHAWK: A zero matchFrom matches everything. --- engines/mohawk/livingbooks.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engines/mohawk/livingbooks.cpp b/engines/mohawk/livingbooks.cpp index cc38adb34f..4fa69e83a4 100644 --- a/engines/mohawk/livingbooks.cpp +++ b/engines/mohawk/livingbooks.cpp @@ -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; } @@ -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; } -- cgit v1.2.3