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/r_data.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/r_data.c')
-rw-r--r-- | src/heretic/r_data.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/heretic/r_data.c b/src/heretic/r_data.c index a2f3f10e..34fcb225 100644 --- a/src/heretic/r_data.c +++ b/src/heretic/r_data.c @@ -29,6 +29,7 @@ #include "i_swap.h" #include "i_system.h" +#include "m_misc.h" #include "r_local.h" #include "p_local.h" @@ -325,14 +326,13 @@ void R_InitTextures(void) // // load the patch names from pnames.lmp // - name[8] = 0; names = W_CacheLumpName(pnames, PU_STATIC); nummappatches = LONG(*((int *) names)); name_p = names + 4; patchlookup = Z_Malloc(nummappatches * sizeof(*patchlookup), PU_STATIC, NULL); for (i = 0; i < nummappatches; i++) { - strncpy(name, name_p + i * 8, 8); + M_StringCopy(name, name_p + i * 8, sizeof(name)); patchlookup[i] = W_CheckNumForName(name); } W_ReleaseLumpName(pnames); |