aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2017-02-14 22:40:13 -0500
committerPaul Gilbert2017-02-14 22:40:13 -0500
commitaa77e260b2aab6d48f7e11bdef422aa59d778a4b (patch)
tree099dde7a445324c12d4637dc605dba95b86cf421
parent01bea5a6d8c42c0b2fe16fe99ffc575c82caff57 (diff)
downloadscummvm-rg350-aa77e260b2aab6d48f7e11bdef422aa59d778a4b.tar.gz
scummvm-rg350-aa77e260b2aab6d48f7e11bdef422aa59d778a4b.tar.bz2
scummvm-rg350-aa77e260b2aab6d48f7e11bdef422aa59d778a4b.zip
TITANIC: Fix findByName when doing a subsearch match
-rw-r--r--engines/titanic/core/tree_item.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/titanic/core/tree_item.cpp b/engines/titanic/core/tree_item.cpp
index 97d06d7bbe..b9b9aca67f 100644
--- a/engines/titanic/core/tree_item.cpp
+++ b/engines/titanic/core/tree_item.cpp
@@ -274,7 +274,7 @@ CNamedItem *CTreeItem::findByName(const CString &name, bool subMatch) {
itemName.toLowercase();
if (subMatch) {
- if (itemName.left(name.size()).compareTo(nameLower))
+ if (!itemName.left(nameLower.size()).compareTo(nameLower))
return dynamic_cast<CNamedItem *>(treeItem);
} else {
if (!itemName.compareTo(nameLower))