From 61e1333c1d39b26c41478df92307543f379e6746 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Mon, 13 Sep 2010 18:47:36 +0000 Subject: Use DEH_snprintf where appropriate. Subversion-branch: /branches/strife-branch Subversion-revision: 2083 --- src/strife/m_menu.c | 6 +++--- src/strife/p_dialog.c | 2 +- src/strife/p_inter.c | 7 ++++--- 3 files changed, 8 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/strife/m_menu.c b/src/strife/m_menu.c index d6e6b44c..8fc049a5 100644 --- a/src/strife/m_menu.c +++ b/src/strife/m_menu.c @@ -1110,7 +1110,7 @@ void M_QuitResponse(int key) I_Quit(); else { - sprintf(buffer, DEH_String("qfmrm%i"), gametic % 8 + 1); + DEH_snprintf(buffer, sizeof(buffer), "qfmrm%i", gametic % 8 + 1); I_StartVoice(buffer); D_QuitGame(); } @@ -1132,8 +1132,8 @@ static char *M_SelectEndMessage(void) // void M_QuitStrife(int choice) { - sprintf(endstring, - DEH_String("Do you really want to leave?\n\n" DOSY)); + DEH_snprintf(endstring, sizeof(endstring), + "Do you really want to leave?\n\n" DOSY); M_StartMessage(endstring, M_QuitResponse, true); } diff --git a/src/strife/p_dialog.c b/src/strife/p_dialog.c index bd32ee33..6444596f 100644 --- a/src/strife/p_dialog.c +++ b/src/strife/p_dialog.c @@ -447,7 +447,7 @@ void P_DialogLoad(void) int lumpnum; // load the SCRIPTxy lump corresponding to MAPxy, if it exists. - sprintf(lumpname, DEH_String("script%02d"), gamemap); + DEH_snprintf(lumpname, sizeof(lumpname), "script%02d", gamemap); if((lumpnum = W_CheckNumForName(lumpname)) == -1) numleveldialogs = 0; else diff --git a/src/strife/p_inter.c b/src/strife/p_inter.c index 56fd24b0..388e49d4 100644 --- a/src/strife/p_inter.c +++ b/src/strife/p_inter.c @@ -646,9 +646,10 @@ void P_KillMobj(mobj_t* source, mobj_t* target) source->player->frags[target->player-players]++; // villsa [STRIFE] new messages when fragging players - sprintf(plrkilledmsg, DEH_String("%s killed %s"), - pnameprefixes[source->player->mo->miscdata], - pnameprefixes[target->player->mo->miscdata]); + DEH_snprintf(plrkilledmsg, sizeof(plrkilledmsg), + "%s killed %s", + pnameprefixes[source->player->mo->miscdata], + pnameprefixes[target->player->mo->miscdata]); if(netgame) players[consoleplayer].message = plrkilledmsg; -- cgit v1.2.3