summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2010-11-10 11:37:30 +0100
committerSebastien Helleu <flashcode@flashtux.org>2010-11-10 11:37:30 +0100
commit7eabbc6bb7fad7ebf71117243389058fd9eeb6bf (patch)
treee9beac3cba31e46ed9c7ececea9d35f9b150ba76 /src/gui
parentc2b507633491c72ce65cde592e3a572459c64f16 (diff)
downloadweechat-7eabbc6bb7fad7ebf71117243389058fd9eeb6bf.zip
Fix crash when displaying groups in buffer nicklist
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/gui-bar-item.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/gui-bar-item.c b/src/gui/gui-bar-item.c
index 4be221727..56ffb0d08 100644
--- a/src/gui/gui-bar-item.c
+++ b/src/gui/gui-bar-item.c
@@ -1220,10 +1220,12 @@ gui_bar_item_default_buffer_nicklist (void *data, struct t_gui_bar_item *item,
{
if (ptr_nick)
length += ptr_nick->group->level + 16 /* color */
- + 1 /* prefix */ + 16 /* color */
+ + ((ptr_nick->prefix) ? strlen (ptr_nick->prefix) : 0)
+ + 16 /* color */
+ strlen (ptr_nick->name) + 1;
else
length += ptr_group->level - 1
+ + 16 /* color */
+ strlen (gui_nicklist_get_group_start (ptr_group->name))
+ 1;
}