summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-05-21 23:14:04 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-05-21 23:14:04 +0000
commit24e88a67723eaa34cf2d6799c6f4f5d3e37b177c (patch)
treee58c8fed59d73899c4935ec6fd90bc78b62e6d08
parenta44d86e0079e4a218812cbec2767b5e91cad6633 (diff)
downloadirssi-24e88a67723eaa34cf2d6799c6f4f5d3e37b177c.zip
irc_parse_prefix() didn't work properly if user name had ! characters.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1509 dbcabf3a-b0e7-0310-adc4-f8d773084564
-rw-r--r--src/irc/core/irc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/irc/core/irc.c b/src/irc/core/irc.c
index e3ba24a2..e6b380b2 100644
--- a/src/irc/core/irc.c
+++ b/src/irc/core/irc.c
@@ -315,8 +315,11 @@ static char *irc_parse_prefix(char *line, char **nick, char **address)
*nick = ++line;
while (*line != '\0' && *line != ' ') {
if (*line == '!') {
- *line = '\0';
- *address = line+1;
+ *line++ = '\0';
+ *address = line;
+ while (*line != '\0' && *line != ' ')
+ line++;
+ break;
}
line++;
}