summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/BString.cc7
1 files changed, 3 insertions, 4 deletions
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> 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;