aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/StringUtil.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/wintermute/StringUtil.cpp')
-rw-r--r--engines/wintermute/StringUtil.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/wintermute/StringUtil.cpp b/engines/wintermute/StringUtil.cpp
index 746250ceeb..8ef6c55e88 100644
--- a/engines/wintermute/StringUtil.cpp
+++ b/engines/wintermute/StringUtil.cpp
@@ -252,9 +252,9 @@ bool StringUtil::EndsWith(const AnsiString &str, const AnsiString &pattern, bool
if (strLength < patternLength || patternLength == 0)
return false;
- Common::String endPart(str.c_str(), strLength - patternLength);
+ Common::String endPart(str.c_str() + (strLength - patternLength), patternLength);
uint32 likeness = str.compareToIgnoreCase(pattern.c_str());
- return (likeness == 0);
+ return (likeness != 0);
}
}