diff options
author | Alexander Færøy <ahf@0x90.dk> | 2015-09-20 21:21:40 +0200 |
---|---|---|
committer | Alexander Færøy <ahf@0x90.dk> | 2015-09-20 21:21:40 +0200 |
commit | be977bf1b795c93dbff4fa52f04b5d425a3f3648 (patch) | |
tree | 2e5667d4fa495f919ae4461790043114d22799da /src/irc/core | |
parent | 1079ad46d21198b26649c2a81a692781e22336aa (diff) | |
download | irssi-be977bf1b795c93dbff4fa52f04b5d425a3f3648.zip |
Fix warning.
Diffstat (limited to 'src/irc/core')
-rw-r--r-- | src/irc/core/irc.c | 8 |
1 files changed, 6 insertions, 2 deletions
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) |