From be977bf1b795c93dbff4fa52f04b5d425a3f3648 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20F=C3=A6r=C3=B8y?= Date: Sun, 20 Sep 2015 21:21:40 +0200 Subject: Fix warning. --- src/irc/core/irc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/irc/core') diff --git a/src/irc/core/irc.c b/src/irc/core/irc.c index 509418b7..4dce3fcf 100644 --- a/src/irc/core/irc.c +++ b/src/irc/core/irc.c @@ -212,8 +212,12 @@ void irc_send_cmd_split(IRC_SERVER_REC *server, const char *cmd, count = 0; if (nickstr->len > 0) g_string_truncate(nickstr, nickstr->len-1); - irc_send_cmdv(server, post == NULL ? "%s %s" : "%s %s %s", - pre, nickstr->str, post); + + if (post == NULL) + irc_send_cmdv(server, "%s %s", pre, nickstr->str); + else + irc_send_cmdv(server, "%s %s %s", pre, nickstr->str, post); + g_string_truncate(nickstr, 0); if (*tmp == NULL || tmp[1] == NULL) -- cgit v1.2.3