From 6bb5f78bd2bdf10ddbb087171c6f640d425c9d40 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 30 Mar 2014 18:50:35 -0400 Subject: heretic: Eliminate use of sprintf(). Use snprintf() in place of sprintf(). This is part of fixing #371. --- src/heretic/sb_bar.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/heretic/sb_bar.c') 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; -- cgit v1.2.3