From 55f1bbcd07b958999bc3ca4b71d21e903a5eecca Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Thu, 29 Aug 2013 07:59:25 +0200 Subject: [PATCH] irc: fix extraction of channel name in notice (when message starts with "[]") --- src/plugins/irc/irc-protocol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index eedad00fd..874e27e5e 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -1135,7 +1135,7 @@ IRC_PROTOCOL_CALLBACK(notice) if (end_char != ' ') { pos = strchr (pos_args, end_char); - if (pos) + if (pos && (pos > pos_args + 1)) { channel = weechat_strndup (pos_args + 1, pos - pos_args - 1); if (channel && irc_channel_search (server, channel))