diff options
author | Simon Howard | 2014-03-30 00:27:11 -0400 |
---|---|---|
committer | Simon Howard | 2014-03-30 00:27:11 -0400 |
commit | 724c4ad7a4f2a541eff157d9196b3835eb4bc8d8 (patch) | |
tree | 41685917cb9172b72b7afd9c108eaaeba3d278ea /src/deh_io.c | |
parent | fb00bf8354efee1847cbec3370f7a34eef745d3a (diff) | |
download | chocolate-doom-724c4ad7a4f2a541eff157d9196b3835eb4bc8d8.tar.gz chocolate-doom-724c4ad7a4f2a541eff157d9196b3835eb4bc8d8.tar.bz2 chocolate-doom-724c4ad7a4f2a541eff157d9196b3835eb4bc8d8.zip |
dehacked: Eliminate some more uses of strncpy().
Use M_StringCopy() instead of strncpy() in the Dehacked code.
Diffstat (limited to 'src/deh_io.c')
-rw-r--r-- | src/deh_io.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/deh_io.c b/src/deh_io.c index 83609068..37fc0a15 100644 --- a/src/deh_io.c +++ b/src/deh_io.c @@ -30,6 +30,7 @@ #include <string.h> #include "i_system.h" +#include "m_misc.h" #include "w_wad.h" #include "z_zone.h" @@ -127,8 +128,7 @@ deh_context_t *DEH_OpenLump(int lumpnum) context->input_buffer_pos = 0; context->filename = malloc(9); - strncpy(context->filename, lumpinfo[lumpnum].name, 8); - context->filename[8] = '\0'; + M_StringCopy(context->filename, lumpinfo[lumpnum].name, 9); return context; } |