summaryrefslogtreecommitdiff
path: root/src/irc/core/modes.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/irc/core/modes.c')
-rw-r--r--src/irc/core/modes.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/irc/core/modes.c b/src/irc/core/modes.c
index 94e3b6b1..994a55f3 100644
--- a/src/irc/core/modes.c
+++ b/src/irc/core/modes.c
@@ -88,14 +88,8 @@ static void mode_add_arg(GString *str, int pos, int updating, const char *arg)
g_string_erase(str, pos, (int) (p-str->str)-pos);
}
- /* .. GLib shouldn't fail when inserting at the end of the string */
- if (pos == str->len) {
- g_string_append_c(str, ' ');
- g_string_append(str, arg);
- } else {
- g_string_insert_c(str, pos, ' ');
- g_string_insert(str, pos+1, arg);
- }
+ g_string_insert_c(str, pos, ' ');
+ g_string_insert(str, pos+1, arg);
}
/* Add mode character to list sorted alphabetically */