summaryrefslogtreecommitdiff
path: root/src/gui/curses/gui-curses-chat.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/curses/gui-curses-chat.c')
-rw-r--r--src/gui/curses/gui-curses-chat.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/curses/gui-curses-chat.c b/src/gui/curses/gui-curses-chat.c
index 0caf0f90d..4ada70146 100644
--- a/src/gui/curses/gui-curses-chat.c
+++ b/src/gui/curses/gui-curses-chat.c
@@ -645,6 +645,8 @@ gui_chat_display_word (struct t_gui_window *window,
nick_offline);
}
ptr_data[pos_saved_char] = saved_char;
+ if (pos_saved_char == 0)
+ break;
ptr_data += pos_saved_char;
}
else
@@ -666,6 +668,8 @@ gui_chat_display_word (struct t_gui_window *window,
apply_style_inactive,
nick_offline);
}
+ if (!ptr_data[0])
+ break;
ptr_data += strlen (ptr_data);
}