1
0
mirror of https://github.com/anope/anope.git synced 2026-06-28 09:46:38 +02:00

Fixed some problems with sepstream when parsing one char tokens

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2436 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
adam-
2009-08-08 04:06:03 +00:00
parent 8df2076024
commit 43d72713c5
+4 -5
View File
@@ -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();
}