From 0084eaa193ac440b9a251d968ea19fbbcea9506e Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Thu, 27 Feb 2014 09:44:59 +0100 Subject: core: replace constant by sizeof in a call to snprintf --- src/gui/curses/gui-curses-chat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/gui') diff --git a/src/gui/curses/gui-curses-chat.c b/src/gui/curses/gui-curses-chat.c index b84a61341..2a4dd9e75 100644 --- a/src/gui/curses/gui-curses-chat.c +++ b/src/gui/curses/gui-curses-chat.c @@ -2019,7 +2019,8 @@ gui_chat_draw (struct t_gui_buffer *buffer, int clear_chat) if (clear_chat) { - snprintf (format_empty, 32, "%%-%ds", ptr_win->win_chat_width); + snprintf (format_empty, sizeof (format_empty), + "%%-%ds", ptr_win->win_chat_width); for (i = 0; i < ptr_win->win_chat_height; i++) { mvwprintw (GUI_WINDOW_OBJECTS(ptr_win)->win_chat, i, 0, -- cgit v1.2.3