diff options
author | 2013-06-29 11:28:09 -0700 | |
---|---|---|
committer | 2013-06-29 11:28:09 -0700 | |
commit | ae4482f43d8f9430950184fe566932a5f2f0551a (patch) | |
tree | 1f3cb4e28ed7d12f610fe3d5b6704d4df9c3fa30 /src/core | |
parent | 7441b2ee5f1ccd2d510848926e0f03f6bbd28015 (diff) |
Fixed hasSuffix and hasPrefix behavior
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/basetypes/MCString.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/basetypes/MCString.cc b/src/core/basetypes/MCString.cc index 5e8f9d2c..766ecaab 100644 --- a/src/core/basetypes/MCString.cc +++ b/src/core/basetypes/MCString.cc @@ -1793,7 +1793,7 @@ String * String::flattenHTML() bool String::hasSuffix(String * suffix) { - if (mLength > suffix->mLength) { + if (mLength >= suffix->mLength) { if (u_memcmp(suffix->mUnicodeChars + (mLength - suffix->mLength), mUnicodeChars, suffix->mLength) == 0) { return true; @@ -1804,7 +1804,7 @@ bool String::hasSuffix(String * suffix) bool String::hasPrefix(String * prefix) { - if (mLength > prefix->mLength) { + if (mLength >= prefix->mLength) { if (u_memcmp(prefix->mUnicodeChars, mUnicodeChars, prefix->mLength) == 0) { return true; } |