From d7a5ba3b2f9fa6b17e5a6abfbbbc3960f8c7d9b1 Mon Sep 17 00:00:00 2001 From: Alyssa Milburn Date: Fri, 24 Jun 2011 21:01:04 +0200 Subject: MOHAWK: Allow matching LBValue items by their name. --- engines/mohawk/livingbooks_code.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'engines') diff --git a/engines/mohawk/livingbooks_code.cpp b/engines/mohawk/livingbooks_code.cpp index 165ca4a328..5ae0e22560 100644 --- a/engines/mohawk/livingbooks_code.cpp +++ b/engines/mohawk/livingbooks_code.cpp @@ -32,6 +32,10 @@ bool LBValue::operator==(const LBValue &x) const { if (type != x.type) { if (isNumeric() && x.isNumeric()) return toDouble() == x.toDouble(); + else if (type == kLBValueString && x.type == kLBValueItemPtr) + return string == x.item->getName(); + else if (type == kLBValueItemPtr && x.type == kLBValueString) + return item->getName() == x.string; else return false; } -- cgit v1.2.3