Merge pull request #3010 from LogicParrot/stringFix
Fix unicode handling in StringUtils::TrimString
This commit is contained in:
commit
7d09fcbd2f
@ -222,7 +222,7 @@ AString TrimString(const AString & str)
|
||||
size_t start = 0;
|
||||
while (start < len)
|
||||
{
|
||||
if (str[start] > 32)
|
||||
if (static_cast<unsigned char>(str[start]) > 32)
|
||||
{
|
||||
break;
|
||||
}
|
||||
@ -236,7 +236,7 @@ AString TrimString(const AString & str)
|
||||
size_t end = len;
|
||||
while (end >= start)
|
||||
{
|
||||
if (str[end] > 32)
|
||||
if (static_cast<unsigned char>(str[end]) > 32)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user