summaryrefslogtreecommitdiff
path: root/src/doom/d_net.c
diff options
context:
space:
mode:
authorSimon Howard2014-03-29 21:23:29 -0400
committerSimon Howard2014-03-29 21:23:29 -0400
commit040ca1cfb5a3e1be7d05bcd90eaa4f01fb68437a (patch)
treea18e508d59f858f2d4bfda860a299a8f271a080a /src/doom/d_net.c
parente76b5678bfcac6fc7a42b2f581192ae08831728e (diff)
downloadchocolate-doom-040ca1cfb5a3e1be7d05bcd90eaa4f01fb68437a.tar.gz
chocolate-doom-040ca1cfb5a3e1be7d05bcd90eaa4f01fb68437a.tar.bz2
chocolate-doom-040ca1cfb5a3e1be7d05bcd90eaa4f01fb68437a.zip
doom: Eliminate use of unsafe string functions.
Eliminate use of strcpy, strcat, strncpy, and use the new safe alternatives.
Diffstat (limited to 'src/doom/d_net.c')
-rw-r--r--src/doom/d_net.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/doom/d_net.c b/src/doom/d_net.c
index 9594d0f7..ad46dc80 100644
--- a/src/doom/d_net.c
+++ b/src/doom/d_net.c
@@ -32,6 +32,7 @@
#include "d_main.h"
#include "m_argv.h"
#include "m_menu.h"
+#include "m_misc.h"
#include "i_system.h"
#include "i_timer.h"
#include "i_video.h"
@@ -59,8 +60,8 @@ static void PlayerQuitGame(player_t *player)
// Do this the same way as Vanilla Doom does, to allow dehacked
// replacements of this message
- strncpy(exitmsg, DEH_String("Player 1 left the game"), sizeof(exitmsg));
- exitmsg[sizeof(exitmsg) - 1] = '\0';
+ M_StringCopy(exitmsg, DEH_String("Player 1 left the game"),
+ sizeof(exitmsg));
exitmsg[7] += player_num;