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/sb_bar.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/sb_bar.c')
-rw-r--r-- | src/heretic/sb_bar.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/heretic/sb_bar.c b/src/heretic/sb_bar.c index 3de57cb1..0a2da956 100644 --- a/src/heretic/sb_bar.c +++ b/src/heretic/sb_bar.c @@ -484,20 +484,20 @@ static void DrawSoundInfo(void) MN_DrTextA(DEH_String("------"), xPos[0], y); continue; } - sprintf(text, "%s", c->name); + snprintf(text, sizeof(text), "%s", c->name); M_ForceUppercase(text); MN_DrTextA(text, xPos[x++], y); - sprintf(text, "%d", c->mo->type); + snprintf(text, sizeof(text), "%d", c->mo->type); MN_DrTextA(text, xPos[x++], y); - sprintf(text, "%d", c->mo->x >> FRACBITS); + snprintf(text, sizeof(text), "%d", c->mo->x >> FRACBITS); MN_DrTextA(text, xPos[x++], y); - sprintf(text, "%d", c->mo->y >> FRACBITS); + snprintf(text, sizeof(text), "%d", c->mo->y >> FRACBITS); MN_DrTextA(text, xPos[x++], y); - sprintf(text, "%d", c->id); + snprintf(text, sizeof(text), "%d", c->id); MN_DrTextA(text, xPos[x++], y); - sprintf(text, "%d", c->priority); + snprintf(text, sizeof(text), "%d", c->priority); MN_DrTextA(text, xPos[x++], y); - sprintf(text, "%d", c->distance); + snprintf(text, sizeof(text), "%d", c->distance); MN_DrTextA(text, xPos[x++], y); } UpdateState |= I_FULLSCRN; |