summaryrefslogtreecommitdiff
path: root/src/gui/gui-bar-item.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2009-02-17 19:23:16 +0100
committerSebastien Helleu <flashcode@flashtux.org>2009-02-17 19:23:16 +0100
commitb5f27d3fead4740099054f82e9a246ebd8a6ae9d (patch)
tree4f8a31924c4fc4b3cda8af53ba9d06809d23bfb4 /src/gui/gui-bar-item.c
parenteaf3319ed342d008893c613817cc5dc13449098c (diff)
downloadweechat-b5f27d3fead4740099054f82e9a246ebd8a6ae9d.zip
Use string instead of char for prefixes in nicklist
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,