diff --git a/src/gui/gui-chat.c b/src/gui/gui-chat.c index 44f847d25..0eb3d168c 100644 --- a/src/gui/gui-chat.c +++ b/src/gui/gui-chat.c @@ -862,7 +862,7 @@ gui_chat_printf_date_tags (struct t_gui_buffer *buffer, time_t date, { time_t date_printed; char *pos, *pos_end; - int one_line = 0; + int one_line; if (!message) return; @@ -885,9 +885,11 @@ gui_chat_printf_date_tags (struct t_gui_buffer *buffer, time_t date, if (date <= 0) date = date_printed; + one_line = 0; pos = vbuffer; while (pos) { + pos_end = NULL; if (!buffer || !buffer->input_multiline) { /* display until next end of line */ @@ -911,9 +913,7 @@ gui_chat_printf_date_tags (struct t_gui_buffer *buffer, time_t date, } if (one_line) - { break; - } pos = (pos_end && pos_end[1]) ? pos_end + 1 : NULL; }