diff options
Diffstat (limited to 'src/hashcomp.cpp')
-rw-r--r-- | src/hashcomp.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/hashcomp.cpp b/src/hashcomp.cpp index 63b758924..0636b3116 100644 --- a/src/hashcomp.cpp +++ b/src/hashcomp.cpp @@ -121,15 +121,14 @@ bool sepstream::GetToken(std::string &token) if (*n == sep || n + 1 == tokens.end()) { last_starting_position = n + 1; - token = std::string(lsp, n + 1 == tokens.end() ? n + 1 : n++); + token = std::string(lsp, n + 1 == tokens.end() ? n + 1 : n); while (token.length() && token.find_last_of(sep) == token.length() - 1) token.erase(token.end() - 1); - if (token.empty()) - ++n; + ++n; - return n == tokens.end() ? false : true; + return true; } ++n; @@ -146,5 +145,5 @@ const std::string sepstream::GetRemaining() bool sepstream::StreamEnd() { - return n + 1 == tokens.end(); + return n == tokens.end(); } |