summaryrefslogtreecommitdiff
path: root/src/irc
diff options
context:
space:
mode:
Diffstat (limited to 'src/irc')
-rw-r--r--src/irc/core/modes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/irc/core/modes.c b/src/irc/core/modes.c
index 10227dcc..80381789 100644
--- a/src/irc/core/modes.c
+++ b/src/irc/core/modes.c
@@ -539,7 +539,7 @@ static char *get_nicks(IRC_CHANNEL_REC *channel,
g_slist_free(nicks);
}
- g_string_truncate(str, str->len-1);
+ if (str->len > 0) g_string_truncate(str, str->len-1);
ret = str->str;
g_string_free(str, FALSE);
return ret;