diff options
author | Simon Howard | 2014-03-29 21:23:29 -0400 |
---|---|---|
committer | Simon Howard | 2014-03-29 21:23:29 -0400 |
commit | 040ca1cfb5a3e1be7d05bcd90eaa4f01fb68437a (patch) | |
tree | a18e508d59f858f2d4bfda860a299a8f271a080a /src/doom/d_net.c | |
parent | e76b5678bfcac6fc7a42b2f581192ae08831728e (diff) | |
download | chocolate-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.c | 5 |
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; |