summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-05-10 21:34:31 +0200
committerMattes D <github@xoft.cz>2015-05-10 21:39:14 +0200
commitb356419a072076eb1ceae3dd73f6391ce5519460 (patch)
treebfd8eff367e03a5502c2eab132a15651c90b0d40 /src
parentInfoReg: Fixed EntireCommand handling for MultiCommandHandler(). (diff)
downloadcuberite-b356419a072076eb1ceae3dd73f6391ce5519460.tar
cuberite-b356419a072076eb1ceae3dd73f6391ce5519460.tar.gz
cuberite-b356419a072076eb1ceae3dd73f6391ce5519460.tar.bz2
cuberite-b356419a072076eb1ceae3dd73f6391ce5519460.tar.lz
cuberite-b356419a072076eb1ceae3dd73f6391ce5519460.tar.xz
cuberite-b356419a072076eb1ceae3dd73f6391ce5519460.tar.zst
cuberite-b356419a072076eb1ceae3dd73f6391ce5519460.zip
Diffstat (limited to '')
-rw-r--r--src/StringUtils.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/StringUtils.cpp b/src/StringUtils.cpp
index 4adc6a0a0..12bd3ada1 100644
--- a/src/StringUtils.cpp
+++ b/src/StringUtils.cpp
@@ -150,6 +150,13 @@ AStringVector StringSplitWithQuotes(const AString & str, const AString & delim)
while ((cutAt = str.find_first_of(delim, Prev)) != str.npos)
{
+ if (cutAt == Prev)
+ {
+ // Empty string due to multiple whitespace / whitespace at the beginning of the input
+ // Just skip it
+ Prev = Prev + 1;
+ continue;
+ }
AString current = str.substr(Prev, cutAt - Prev);
if ((current.front() == '"') || (current.front() == '\''))
{