diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/gui-completion.c | 8 | ||||
-rw-r--r-- | src/gui/gui-nick.c | 3 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/gui/gui-completion.c b/src/gui/gui-completion.c index e2459a781..5e07861f1 100644 --- a/src/gui/gui-completion.c +++ b/src/gui/gui-completion.c @@ -1144,6 +1144,7 @@ gui_completion_complete (struct t_gui_completion *completion) int length, word_found_seen, other_completion, partial_completion; int common_prefix_size, index, index2; struct t_gui_completion_word *ptr_completion_word, *ptr_completion_word2; + char *word_found_lower; length = utf8_strlen (completion->base_word); word_found_seen = 0; @@ -1262,7 +1263,12 @@ gui_completion_complete (struct t_gui_completion *completion) completion->word_found_is_nick = 0; completion->add_space = 0; completion->position = -1; - string_tolower (completion->word_found); + word_found_lower = string_tolower (completion->word_found); + if (word_found_lower) + { + free (completion->word_found); + completion->word_found = word_found_lower; + } /* alert user of partial completion */ if (CONFIG_BOOLEAN(config_completion_partial_completion_alert)) diff --git a/src/gui/gui-nick.c b/src/gui/gui-nick.c index d6fcfc982..9953194bc 100644 --- a/src/gui/gui-nick.c +++ b/src/gui/gui-nick.c @@ -182,10 +182,9 @@ gui_nick_get_forced_color (const char *nickname) if (forced_color) return forced_color; - nick_lower = strdup (nickname); + nick_lower = string_tolower (nickname); if (nick_lower) { - string_tolower (nick_lower); forced_color = hashtable_get (config_hashtable_nick_color_force, nick_lower); free (nick_lower); |