diff options
author | Simon Howard | 2014-03-30 19:08:27 -0400 |
---|---|---|
committer | Simon Howard | 2014-03-30 19:08:27 -0400 |
commit | 2ea8fd11ec5da77ba66b24c0c2cbee892e803904 (patch) | |
tree | eed48a3b6ce007c54671099c33a041a081609681 /src/strife/p_inter.c | |
parent | 01ae851bf998330a9ca95467e238c507aa55cae1 (diff) | |
download | chocolate-doom-2ea8fd11ec5da77ba66b24c0c2cbee892e803904.tar.gz chocolate-doom-2ea8fd11ec5da77ba66b24c0c2cbee892e803904.tar.bz2 chocolate-doom-2ea8fd11ec5da77ba66b24c0c2cbee892e803904.zip |
strife: Eliminate use of sprintf().
Use snprintf() in place of sprintf(). This is part of fixing #371.
Diffstat (limited to 'src/strife/p_inter.c')
-rw-r--r-- | src/strife/p_inter.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/strife/p_inter.c b/src/strife/p_inter.c index 573a5efd..00b0ef24 100644 --- a/src/strife/p_inter.c +++ b/src/strife/p_inter.c @@ -971,7 +971,8 @@ void P_KillMobj(mobj_t* source, mobj_t* target) EV_DoDoor(&junk, close); P_NoiseAlert(players[0].mo, players[0].mo); - sprintf(plrkilledmsg, "%s", DEH_String("You're dead! You set off the alarm.")); + snprintf(plrkilledmsg, sizeof(plrkilledmsg), + "%s", DEH_String("You're dead! You set off the alarm.")); if(!deathmatch) players[consoleplayer].message = plrkilledmsg; @@ -1010,7 +1011,8 @@ void P_KillMobj(mobj_t* source, mobj_t* target) case MT_TOKEN_ALARM: P_NoiseAlert(players[0].mo, players[0].mo); - sprintf(plrkilledmsg, "%s", DEH_String("You Fool! You've set off the alarm")); + snprintf(plrkilledmsg, sizeof(plrkilledmsg), + "%s", DEH_String("You Fool! You've set off the alarm")); if(!deathmatch) players[consoleplayer].message = plrkilledmsg; return; |