diff options
Diffstat (limited to 'src/hexen/h2_main.c')
-rw-r--r-- | src/hexen/h2_main.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/hexen/h2_main.c b/src/hexen/h2_main.c index 0afdff24..845496b4 100644 --- a/src/hexen/h2_main.c +++ b/src/hexen/h2_main.c @@ -551,12 +551,11 @@ static void HandleArgs(void) { char file[256]; - strncpy(file, myargv[p+1], sizeof(file)); - file[sizeof(file) - 6] = '\0'; + M_StringCopy(file, myargv[p+1], sizeof(file)); - if (strcasecmp(file + strlen(file) - 4, ".lmp") != 0) + if (!M_StringEndsWith(file, ".lmp")) { - strcat(file, ".lmp"); + M_StringConcat(file, ".lmp", sizeof(file)); } W_AddFile(file); |