summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLogicParrot <LogicParrot@users.noreply.github.com>2016-02-16 16:26:18 +0100
committerLogicParrot <LogicParrot@users.noreply.github.com>2016-02-16 16:26:18 +0100
commit7d09fcbd2f87857abad4ea9fbb4f386aa0b44d89 (patch)
treee581875b2dde7280c70e929775c237fcda66c0e8
parentMerge pull request #2985 from marvinkopf/poweredrail (diff)
parentFix unicode handling in StringUtils::TrimString (diff)
downloadcuberite-7d09fcbd2f87857abad4ea9fbb4f386aa0b44d89.tar
cuberite-7d09fcbd2f87857abad4ea9fbb4f386aa0b44d89.tar.gz
cuberite-7d09fcbd2f87857abad4ea9fbb4f386aa0b44d89.tar.bz2
cuberite-7d09fcbd2f87857abad4ea9fbb4f386aa0b44d89.tar.lz
cuberite-7d09fcbd2f87857abad4ea9fbb4f386aa0b44d89.tar.xz
cuberite-7d09fcbd2f87857abad4ea9fbb4f386aa0b44d89.tar.zst
cuberite-7d09fcbd2f87857abad4ea9fbb4f386aa0b44d89.zip
Diffstat (limited to '')
-rw-r--r--src/StringUtils.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/StringUtils.cpp b/src/StringUtils.cpp
index 76b9fdbde..8ea94ecd7 100644
--- a/src/StringUtils.cpp
+++ b/src/StringUtils.cpp
@@ -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;
}