From 17c14e1fad6dc277a6e58e4f421d5c65e210d1fe Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Tue, 1 Apr 2014 20:56:33 -0400 Subject: setup: Eliminate use of sprintf(). Use M_snprintf() or M_StringJoin() instead where appropriate. This fixes #371. --- src/setup/keyboard.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/setup/keyboard.c') diff --git a/src/setup/keyboard.c b/src/setup/keyboard.c index 930d2714..76880f49 100644 --- a/src/setup/keyboard.c +++ b/src/setup/keyboard.c @@ -23,6 +23,7 @@ #include "doomtype.h" #include "m_config.h" #include "m_controls.h" +#include "m_misc.h" #include "execute.h" #include "txt_keyinput.h" @@ -171,7 +172,7 @@ static void AddSectionLabel(txt_table_t *table, char *title, boolean add_space) NULL); } - sprintf(buf, " - %s - ", title); + M_snprintf(buf, sizeof(buf), " - %s - ", title); TXT_AddWidgets(table, TXT_NewLabel(buf), TXT_NewStrut(0, 0), NULL); -- cgit v1.2.3