diff options
author | flx5 <git@flx5.com> | 2015-03-11 04:38:15 +0100 |
---|---|---|
committer | flx5 <git@flx5.com> | 2015-03-11 04:38:15 +0100 |
commit | 76012ee090c7e500ef47c3b4114a386cad176bd9 (patch) | |
tree | 2a7337261536a43743c191dee36cc9bbaa777494 /src/StringUtils.cpp | |
parent | Fixed some markup issues (diff) | |
download | cuberite-76012ee090c7e500ef47c3b4114a386cad176bd9.tar cuberite-76012ee090c7e500ef47c3b4114a386cad176bd9.tar.gz cuberite-76012ee090c7e500ef47c3b4114a386cad176bd9.tar.bz2 cuberite-76012ee090c7e500ef47c3b4114a386cad176bd9.tar.lz cuberite-76012ee090c7e500ef47c3b4114a386cad176bd9.tar.xz cuberite-76012ee090c7e500ef47c3b4114a386cad176bd9.tar.zst cuberite-76012ee090c7e500ef47c3b4114a386cad176bd9.zip |
Diffstat (limited to '')
-rw-r--r-- | src/StringUtils.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/StringUtils.cpp b/src/StringUtils.cpp index 084a42280..343f93ce3 100644 --- a/src/StringUtils.cpp +++ b/src/StringUtils.cpp @@ -150,11 +150,11 @@ AStringVector StringSplitWithQuotes(const AString & str, const AString & delim) while ((cutAt = str.find_first_of(delim, Prev)) != str.npos) { AString current = str.substr(Prev, cutAt - Prev); - if ((current.at(0) == '"') || (current.at(0) == '\'')) + if ((current.at(0) == '"') || (current.at(0) == '\'')) { Prev += 1; cutAt = str.find_first_of(current.at(0), Prev); - if (cutAt != str.npos) + if (cutAt != str.npos) { current = str.substr(Prev, cutAt - Prev); cutAt += 1; @@ -169,7 +169,8 @@ AStringVector StringSplitWithQuotes(const AString & str, const AString & delim) { AString current = str.substr(Prev); - if ((current.length() >= 2) && ((current.front() == '"') || (current.front() == '\'')) && (current.front() == current.back())) { + if ((current.length() >= 2) && ((current.front() == '"') || (current.front() == '\'')) && (current.front() == current.back())) + { current = current.substr(1, current.length() - 2); } |