Fix unicode handling in StringUtils::TrimString
This commit is contained in:
parent
3c272b55ea
commit
f405c8820e
@ -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