diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2024-05-25 19:28:49 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2024-05-25 19:28:49 +0200 |
commit | 2488466b0cc9e26db505614424829ae4f9717950 (patch) | |
tree | 0a05209a7d36f18258eaa4e888f476d9b8fab069 /src/plugins | |
parent | 647ca0c0472b327425ad651748f2a0e7cbf176a0 (diff) | |
download | weechat-2488466b0cc9e26db505614424829ae4f9717950.zip |
irc: fix crash in split of IRC message containing a newline if the server is not given
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/irc/irc-message.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/irc/irc-message.c b/src/plugins/irc/irc-message.c index 2dc822f1f..052b07282 100644 --- a/src/plugins/irc/irc-message.c +++ b/src/plugins/irc/irc-message.c @@ -1667,8 +1667,9 @@ irc_message_split (struct t_irc_server *server, const char *message) } multiline = ( - ((weechat_strcasecmp (command, "privmsg") == 0) - || (weechat_strcasecmp (command, "notice") == 0)) + server + && ((weechat_strcasecmp (command, "privmsg") == 0) + || (weechat_strcasecmp (command, "notice") == 0)) && message && strchr (message, '\n') && (index_args + 1 <= argc - 1) |