diff options
author | Simon Howard | 2014-04-01 20:56:33 -0400 |
---|---|---|
committer | Simon Howard | 2014-04-01 20:56:33 -0400 |
commit | 17c14e1fad6dc277a6e58e4f421d5c65e210d1fe (patch) | |
tree | fab7248ca23ce615c62222377a3ff5cab6bbeb73 /src/setup/keyboard.c | |
parent | 8eb3200286d523379295143ce3f44d77ce036d4b (diff) | |
download | chocolate-doom-17c14e1fad6dc277a6e58e4f421d5c65e210d1fe.tar.gz chocolate-doom-17c14e1fad6dc277a6e58e4f421d5c65e210d1fe.tar.bz2 chocolate-doom-17c14e1fad6dc277a6e58e4f421d5c65e210d1fe.zip |
setup: Eliminate use of sprintf().
Use M_snprintf() or M_StringJoin() instead where appropriate.
This fixes #371.
Diffstat (limited to 'src/setup/keyboard.c')
-rw-r--r-- | src/setup/keyboard.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); |