From 91882b1a2b49b0aba84fcfb123310a2346d5e9e5 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Mon, 29 Apr 2002 19:39:57 +0000 Subject: irc_send_cmd_split() printed glib warning if nick parameter didn't exist. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2740 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/irc/core/irc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/irc/core') diff --git a/src/irc/core/irc.c b/src/irc/core/irc.c index 0743dae2..cf31814c 100644 --- a/src/irc/core/irc.c +++ b/src/irc/core/irc.c @@ -199,7 +199,8 @@ void irc_send_cmd_split(IRC_SERVER_REC *server, const char *cmd, } count = 0; - g_string_truncate(nickstr, nickstr->len-1); + 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); g_string_truncate(nickstr, 0); -- cgit v1.2.3