From 24e88a67723eaa34cf2d6799c6f4f5d3e37b177c Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Mon, 21 May 2001 23:14:04 +0000 Subject: [PATCH] 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 --- src/irc/core/irc.c | 7 +++++-- 1 file 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++; }