diff --git a/src/irc/irc-recv.c b/src/irc/irc-recv.c index 29fb649da..166d9afda 100644 --- a/src/irc/irc-recv.c +++ b/src/irc/irc-recv.c @@ -714,8 +714,12 @@ irc_cmd_recv_notice (t_irc_server *server, char *host, char *arguments) { pos = strchr (host, '!'); if (pos) + { pos[0] = '\0'; - host2 = pos + 1; + host2 = pos + 1; + } + else + host2 = NULL; } pos = strchr (arguments, ' '); diff --git a/weechat/src/irc/irc-recv.c b/weechat/src/irc/irc-recv.c index 29fb649da..166d9afda 100644 --- a/weechat/src/irc/irc-recv.c +++ b/weechat/src/irc/irc-recv.c @@ -714,8 +714,12 @@ irc_cmd_recv_notice (t_irc_server *server, char *host, char *arguments) { pos = strchr (host, '!'); if (pos) + { pos[0] = '\0'; - host2 = pos + 1; + host2 = pos + 1; + } + else + host2 = NULL; } pos = strchr (arguments, ' ');