summaryrefslogtreecommitdiff
path: root/src/heretic/d_main.c
diff options
context:
space:
mode:
authorSimon Howard2014-03-30 18:50:35 -0400
committerSimon Howard2014-03-30 18:50:35 -0400
commit6bb5f78bd2bdf10ddbb087171c6f640d425c9d40 (patch)
tree7e1139bcc7928983b8dd2556991be6076b95ed35 /src/heretic/d_main.c
parent4465be140a27e47aa8bed15be4e58064297c7d94 (diff)
downloadchocolate-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.c4
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]);
}
}