diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2014-02-01 09:12:51 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2014-02-01 09:12:51 +0100 |
commit | 9db356bd9b8629752ed622a31e90529414fcda80 (patch) | |
tree | ceff2e2e77d32d6329bbc79227dcbaa66c151e77 | |
parent | 219f75b225a011354cc4651376e74a327a1a732f (diff) | |
download | weechat-9db356bd9b8629752ed622a31e90529414fcda80.zip |
core: fix crash when creating two bars with same name but different case (bug #41418)
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | src/gui/gui-bar.c | 8 |
2 files changed, 6 insertions, 4 deletions
@@ -11,6 +11,8 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes] == Version 0.4.3 (under dev) +* core: fix crash when creating two bars with same name but different case + (bug #41418) * core: fix display of read marker when all buffer lines are unread and that option weechat.look.read_marker_always_show is on * core: fix memory leak in regex matching when evaluating expression diff --git a/src/gui/gui-bar.c b/src/gui/gui-bar.c index d48b59a89..4a48124c8 100644 --- a/src/gui/gui-bar.c +++ b/src/gui/gui-bar.c @@ -520,7 +520,7 @@ gui_bar_search (const char *name) for (ptr_bar = gui_bars; ptr_bar; ptr_bar = ptr_bar->next_bar) { - if (strcmp (ptr_bar->name, name) == 0) + if (string_strcasecmp (ptr_bar->name, name) == 0) return ptr_bar; } @@ -550,7 +550,7 @@ gui_bar_search_with_option_name (const char *option_name) { for (ptr_bar = gui_bars; ptr_bar; ptr_bar = ptr_bar->next_bar) { - if (strcmp (ptr_bar->name, bar_name) == 0) + if (string_strcasecmp (ptr_bar->name, bar_name) == 0) break; } free (bar_name); @@ -1342,7 +1342,7 @@ gui_bar_default_items (const char *bar_name) for (i = 0; gui_bar_items_default_for_bars[i][0]; i++) { - if (strcmp (gui_bar_items_default_for_bars[i][0], bar_name) == 0) + if (string_strcasecmp (gui_bar_items_default_for_bars[i][0], bar_name) == 0) return gui_bar_items_default_for_bars[i][1]; } @@ -2078,7 +2078,7 @@ gui_bar_update (const char *name) for (ptr_bar = gui_bars; ptr_bar; ptr_bar = ptr_bar->next_bar) { if (!CONFIG_BOOLEAN(ptr_bar->options[GUI_BAR_OPTION_HIDDEN]) - && (strcmp (ptr_bar->name, name) == 0)) + && (string_strcasecmp (ptr_bar->name, name) == 0)) { gui_bar_ask_refresh (ptr_bar); } |