mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-09 10:39:02 -04:00
Fix bug where an empty parameter is generated when input to a tokenstream ends in a colon
This commit is contained in:
parent
aceb2c4846
commit
a18c7c4203
@ -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))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user