diff options
author | Simon Howard | 2014-03-30 18:50:35 -0400 |
---|---|---|
committer | Simon Howard | 2014-03-30 18:50:35 -0400 |
commit | 6bb5f78bd2bdf10ddbb087171c6f640d425c9d40 (patch) | |
tree | 7e1139bcc7928983b8dd2556991be6076b95ed35 /src/heretic/d_main.c | |
parent | 4465be140a27e47aa8bed15be4e58064297c7d94 (diff) | |
download | chocolate-doom-6bb5f78bd2bdf10ddbb087171c6f640d425c9d40.tar.gz chocolate-doom-6bb5f78bd2bdf10ddbb087171c6f640d425c9d40.tar.bz2 chocolate-doom-6bb5f78bd2bdf10ddbb087171c6f640d425c9d40.zip |
heretic: Eliminate use of sprintf().
Use snprintf() in place of sprintf(). This is part of fixing #371.
Diffstat (limited to 'src/heretic/d_main.c')
-rw-r--r-- | src/heretic/d_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/heretic/d_main.c b/src/heretic/d_main.c index d0fdc582..81fa6c0d 100644 --- a/src/heretic/d_main.c +++ b/src/heretic/d_main.c @@ -247,7 +247,7 @@ void D_DoomLoop(void) if (M_CheckParm("-debugfile")) { char filename[20]; - sprintf(filename, "debug%i.txt", consoleplayer); + snprintf(filename, sizeof(filename), "debug%i.txt", consoleplayer); debugfile = fopen(filename, "w"); } I_GraphicsCheckCommandLine(); @@ -776,7 +776,7 @@ void D_BindVariables(void) { char buf[12]; - sprintf(buf, "chatmacro%i", i); + snprintf(buf, sizeof(buf), "chatmacro%i", i); M_BindVariable(buf, &chat_macros[i]); } } |