1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-08 02:33:12 +02:00

irc: fix display of TOPIC message with an empty trailing parameter

This commit is contained in:
Sébastien Helleu
2022-07-21 11:16:50 +02:00
parent 569c93c6fb
commit d5c4342bce
3 changed files with 11 additions and 3 deletions
+5 -2
View File
@@ -3258,7 +3258,7 @@ IRC_PROTOCOL_CALLBACK(topic)
if (ptr_channel)
irc_channel_join_smart_filtered_unmask (ptr_channel, nick);
if (str_topic)
if (str_topic && str_topic[0])
{
topic_color = irc_color_decode (
str_topic,
@@ -3361,7 +3361,10 @@ IRC_PROTOCOL_CALLBACK(topic)
}
if (ptr_channel)
irc_channel_set_topic (ptr_channel, str_topic);
{
irc_channel_set_topic (ptr_channel,
(str_topic && str_topic[0]) ? str_topic : NULL);
}
if (str_topic)
free (str_topic);