From 7339ca988f65cad90a6d0a22e93e1925e4384c35 Mon Sep 17 00:00:00 2001 From: Einar Johan Trøan Sømåen Date: Fri, 11 May 2012 01:32:23 +0200 Subject: WINTERMUTE: Fix StringUtil::EndsWith --- engines/wintermute/StringUtil.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines') 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); } } -- cgit v1.2.3