summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2002-04-29 19:39:57 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2002-04-29 19:39:57 +0000
commit91882b1a2b49b0aba84fcfb123310a2346d5e9e5 (patch)
treefc4ededa97cf710ddd935296e546889a9b1147b4 /src
parent06127b4004da0603dd39fe6c4ef99f77c85c29b0 (diff)
downloadirssi-91882b1a2b49b0aba84fcfb123310a2346d5e9e5.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/irc/core/irc.c3
1 files changed, 2 insertions, 1 deletions
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);