summaryrefslogtreecommitdiff
path: root/src/gui/gui-bar-item.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/gui-bar-item.c')
-rw-r--r--src/gui/gui-bar-item.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gui/gui-bar-item.c b/src/gui/gui-bar-item.c
index 66ba2db3b..4892a2027 100644
--- a/src/gui/gui-bar-item.c
+++ b/src/gui/gui-bar-item.c
@@ -1108,7 +1108,7 @@ gui_bar_item_default_buffer_nicklist (void *data, struct t_gui_bar_item *item,
struct t_gui_nick *ptr_nick;
struct t_config_option *ptr_option;
int i, length;
- char *buf, str_prefix[2];
+ char *buf;
/* make C compiler happy */
(void) data;
@@ -1176,9 +1176,8 @@ gui_bar_item_default_buffer_nicklist (void *data, struct t_gui_bar_item *item,
{
strcat (buf, gui_color_get_custom (ptr_nick->prefix_color));
}
- str_prefix[0] = ptr_nick->prefix;
- str_prefix[1] = '\0';
- strcat (buf, str_prefix);
+ if (ptr_nick->prefix)
+ strcat (buf, ptr_nick->prefix);
if (strchr (ptr_nick->color, '.'))
{
config_file_search_with_string (ptr_nick->color,