summaryrefslogtreecommitdiff
path: root/src/strife/p_dialog.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/strife/p_dialog.c')
-rw-r--r--src/strife/p_dialog.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/strife/p_dialog.c b/src/strife/p_dialog.c
index 070288aa..95723a56 100644
--- a/src/strife/p_dialog.c
+++ b/src/strife/p_dialog.c
@@ -38,6 +38,7 @@
#include "doomstat.h"
#include "m_random.h"
#include "m_menu.h"
+#include "m_misc.h"
#include "r_main.h"
#include "v_video.h"
#include "p_local.h"
@@ -719,7 +720,7 @@ boolean P_GiveItemToPlayer(player_t *player, int sprnum, mobjtype_t type)
{
if(mobjinfo[type].name)
{
- strncpy(pickupstring, DEH_String(mobjinfo[type].name), 39);
+ M_StringCopy(pickupstring, DEH_String(mobjinfo[type].name), 39);
player->message = pickupstring;
}
player->questflags |= 1 << (type - MT_TOKEN_QUEST1);
@@ -1132,10 +1133,9 @@ static void P_DialogDrawer(void)
if(currentdialog->choices[i].needamounts[0] > 0)
{
// haleyjd 20120401: necessary to avoid undefined behavior:
- strcpy(choicetext2, choicetext);
+ M_StringCopy(choicetext2, choicetext, sizeof(choicetext2));
DEH_snprintf(choicetext, sizeof(choicetext),
- "%s for %d",
- choicetext2,
+ "%s for %d", choicetext2,
currentdialog->choices[i].needamounts[0]);
}
@@ -1228,7 +1228,7 @@ void P_DialogDoChoice(int choice)
{
DEH_snprintf(mission_objective, OBJECTIVE_LEN, "log%i", objective);
objlump = W_CacheLumpName(mission_objective, PU_CACHE);
- strncpy(mission_objective, objlump, OBJECTIVE_LEN);
+ M_StringCopy(mission_objective, objlump, OBJECTIVE_LEN);
}
// haleyjd 20130301: v1.31 hack: if first char of message is a period,
// clear the player's message. Is this actually used anywhere?