From 16543a704384a7da0b45fd8053434cca1a0dcfd9 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Wed, 25 Jun 2014 15:02:03 -0700 Subject: Fixing tokenize. --- src/BString.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/BString.cc b/src/BString.cc index 5f4b868..f5bcfee 100644 --- a/src/BString.cc +++ b/src/BString.cc @@ -164,13 +164,12 @@ std::vector Balau::String::tokenize(const String & delimiters, bo pos = strlen(); if ((pos != lastPos) || !trimEmpty) - tokens.push_back(extract(lastPos, pos)); + tokens.push_back(extract(lastPos, pos - lastPos)); return tokens; - } - else { + } else { if ((pos != lastPos) || !trimEmpty) - tokens.push_back(extract(lastPos, pos)); + tokens.push_back(extract(lastPos, pos - lastPos)); } lastPos = pos + 1; -- cgit v1.2.3