diff options
Diffstat (limited to 'src/strife/r_data.c')
-rw-r--r-- | src/strife/r_data.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/strife/r_data.c b/src/strife/r_data.c index b8fa5686..51e8da67 100644 --- a/src/strife/r_data.c +++ b/src/strife/r_data.c @@ -37,6 +37,7 @@ #include "r_local.h" #include "p_local.h" #include "doomstat.h" +#include "m_misc.h" #include "r_sky.h" #include "r_data.h" #include "sounds.h" // villsa [STRIFE] @@ -485,21 +486,20 @@ void R_InitTextures (void) int temp2; int temp3; - + // Load the patch names from pnames.lmp. - name[8] = 0; names = W_CacheLumpName (DEH_String("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++) + + 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(DEH_String("PNAMES")); - + // Load the map texture definitions from textures.lmp. // The data is contained in one or two lumps, // TEXTURE1 for shareware, plus TEXTURE2 for commercial. |