diff options
author | Simon Howard | 2014-03-29 21:24:03 -0400 |
---|---|---|
committer | Simon Howard | 2014-03-29 21:24:03 -0400 |
commit | 5f9b4368a2adad65dcc960a76c45d12059ca7214 (patch) | |
tree | 8b9096d02849b47fb4b445989704a8cde733583b /src/heretic/mn_menu.c | |
parent | 040ca1cfb5a3e1be7d05bcd90eaa4f01fb68437a (diff) | |
download | chocolate-doom-5f9b4368a2adad65dcc960a76c45d12059ca7214.tar.gz chocolate-doom-5f9b4368a2adad65dcc960a76c45d12059ca7214.tar.bz2 chocolate-doom-5f9b4368a2adad65dcc960a76c45d12059ca7214.zip |
heretic: Eliminate use of unsafe string functions.
Eliminate use of strcpy, strcat, strncpy, and use the new safe
alternatives.
Diffstat (limited to 'src/heretic/mn_menu.c')
-rw-r--r-- | src/heretic/mn_menu.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/heretic/mn_menu.c b/src/heretic/mn_menu.c index 1c94b20b..3057261f 100644 --- a/src/heretic/mn_menu.c +++ b/src/heretic/mn_menu.c @@ -32,6 +32,7 @@ #include "i_system.h" #include "i_swap.h" #include "m_controls.h" +#include "m_misc.h" #include "p_local.h" #include "r_local.h" #include "s_sound.h" @@ -854,7 +855,7 @@ static boolean SCSaveGame(int option) if (!FileMenuKeySteal) { FileMenuKeySteal = true; - strcpy(oldSlotText, SlotText[option]); + M_StringCopy(oldSlotText, SlotText[option], sizeof(oldSlotText)); ptr = SlotText[option]; while (*ptr) { @@ -1513,7 +1514,8 @@ boolean MN_Responder(event_t * event) if (key == KEY_ESCAPE) { memset(SlotText[currentSlot], 0, SLOTTEXTLEN + 2); - strcpy(SlotText[currentSlot], oldSlotText); + M_StringCopy(SlotText[currentSlot], oldSlotText, + sizeof(SlotText[currentSlot])); SlotStatus[currentSlot]--; MN_DeactivateMenu(); return (true); |