Fix bug where an empty parameter is generated when input to a tokenstream ends in a colon

This commit is contained in:
Jackmcbarn 2011-01-22 14:13:16 -05:00
parent aceb2c4846
commit a18c7c4203

View File

@ -199,7 +199,7 @@ bool irc::tokenstream::GetToken(std::string &token)
/* If we find a space, or end of string, this is the end of a token. /* If we find a space, or end of string, this is the end of a token.
*/ */
last_starting_position = n+1; last_starting_position = n+1;
last_pushed = true; last_pushed = *n == ' ';
std::string strip(lsp, n+1 == tokens.end() ? n+1 : n++); std::string strip(lsp, n+1 == tokens.end() ? n+1 : n++);
while ((strip.length()) && (strip.find_last_of(' ') == strip.length() - 1)) while ((strip.length()) && (strip.find_last_of(' ') == strip.length() - 1))