aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-05-11 01:32:23 +0200
committerEinar Johan Trøan Sømåen2012-06-02 12:42:11 +0200
commit7339ca988f65cad90a6d0a22e93e1925e4384c35 (patch)
tree4a473e85072ab2df90e2cbc5e60d62a18f791bf2 /engines
parentffffd68f195963a2d55f12bdecd6e05699669c38 (diff)
downloadscummvm-rg350-7339ca988f65cad90a6d0a22e93e1925e4384c35.tar.gz
scummvm-rg350-7339ca988f65cad90a6d0a22e93e1925e4384c35.tar.bz2
scummvm-rg350-7339ca988f65cad90a6d0a22e93e1925e4384c35.zip
WINTERMUTE: Fix StringUtil::EndsWith
Diffstat (limited to 'engines')
-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);
}
}