diff options
author | Simon Howard | 2014-03-29 21:49:57 -0400 |
---|---|---|
committer | Simon Howard | 2014-03-29 21:49:57 -0400 |
commit | eb3a4033c7d6f1d5e042edd5f416bbc257e40975 (patch) | |
tree | 9b6871a887655f88b4dbb1c5412469924604fb7e /src/strife/p_dialog.h | |
parent | 1e5e0a565cbcaf4f8aafa5a12c84e987aa822e13 (diff) | |
download | chocolate-doom-eb3a4033c7d6f1d5e042edd5f416bbc257e40975.tar.gz chocolate-doom-eb3a4033c7d6f1d5e042edd5f416bbc257e40975.tar.bz2 chocolate-doom-eb3a4033c7d6f1d5e042edd5f416bbc257e40975.zip |
strife: Eliminate use of unsafe string functions.
Eliminate use of strcpy, strcat, strncpy, and use the new safe
alternatives.
Diffstat (limited to 'src/strife/p_dialog.h')
-rw-r--r-- | src/strife/p_dialog.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/strife/p_dialog.h b/src/strife/p_dialog.h index 7463490b..44b1da6a 100644 --- a/src/strife/p_dialog.h +++ b/src/strife/p_dialog.h @@ -52,7 +52,8 @@ extern int dialogshowtext; do { \
int obj_ln = W_CheckNumForName(DEH_String(x)); \
if(obj_ln > minlumpnum) \
- strncpy(mission_objective, W_CacheLumpNum(obj_ln, PU_CACHE), OBJECTIVE_LEN);\
+ M_StringCopy(mission_objective, W_CacheLumpNum(obj_ln, PU_CACHE), \
+ OBJECTIVE_LEN);\
} while(0)
// haleyjd - voice and objective in one
@@ -61,7 +62,8 @@ do { \ int obj_ln = W_CheckNumForName(DEH_String(log)); \
I_StartVoice(DEH_String(voice)); \
if(obj_ln > minlumpnum) \
- strncpy(mission_objective, W_CacheLumpNum(obj_ln, PU_CACHE), OBJECTIVE_LEN);\
+ M_StringCopy(mission_objective, W_CacheLumpNum(obj_ln, PU_CACHE), \
+ OBJECTIVE_LEN);\
} while(0)
typedef struct mapdlgchoice_s
|