aboutsummaryrefslogtreecommitdiffstats
path: root/src/hashcomp.cpp
diff options
context:
space:
mode:
authorGravatar Jackmcbarn2011-01-22 14:13:03 -0500
committerGravatar Jackmcbarn2011-01-22 14:13:03 -0500
commit72da192afe64d83eeb57b2ae753d86d590655c4f (patch)
tree377e8487c1b4e9f7657190db8a92de9b334bf49d /src/hashcomp.cpp
parentFix unsafe iteration in m_timedbans (diff)
downloadinspircd++-72da192afe64d83eeb57b2ae753d86d590655c4f.tar.gz
inspircd++-72da192afe64d83eeb57b2ae753d86d590655c4f.tar.bz2
inspircd++-72da192afe64d83eeb57b2ae753d86d590655c4f.zip
Fix bug where an empty parameter is generated when input to a tokenstream ends in a colon
Diffstat (limited to 'src/hashcomp.cpp')
-rw-r--r--src/hashcomp.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hashcomp.cpp b/src/hashcomp.cpp
index 6c0ce82b8..cd9253b3f 100644
--- a/src/hashcomp.cpp
+++ b/src/hashcomp.cpp
@@ -197,7 +197,7 @@ bool irc::tokenstream::GetToken(std::string &token)
/* If we find a space, or end of string, this is the end of a token.
*/
last_starting_position = n+1;
- last_pushed = true;
+ last_pushed = *n == ' ';
std::string strip(lsp, n+1 == tokens.end() ? n+1 : n++);
while ((strip.length()) && (strip.find_last_of(' ') == strip.length() - 1))