1
0

Merge pull request #3010 from LogicParrot/stringFix

Fix unicode handling in StringUtils::TrimString
This commit is contained in:
LogicParrot 2016-02-16 17:26:18 +02:00
commit 7d09fcbd2f

View File

@ -222,7 +222,7 @@ AString TrimString(const AString & str)
size_t start = 0; size_t start = 0;
while (start < len) while (start < len)
{ {
if (str[start] > 32) if (static_cast<unsigned char>(str[start]) > 32)
{ {
break; break;
} }
@ -236,7 +236,7 @@ AString TrimString(const AString & str)
size_t end = len; size_t end = len;
while (end >= start) while (end >= start)
{ {
if (str[end] > 32) if (static_cast<unsigned char>(str[end]) > 32)
{ {
break; break;
} }