summaryrefslogtreecommitdiff
path: root/src/hexen
diff options
context:
space:
mode:
Diffstat (limited to 'src/hexen')
-rw-r--r--src/hexen/h2_main.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/hexen/h2_main.c b/src/hexen/h2_main.c
index 7084ceec..1786a1fb 100644
--- a/src/hexen/h2_main.c
+++ b/src/hexen/h2_main.c
@@ -623,17 +623,23 @@ static void HandleArgs(void)
if (p)
{
+ char *uc_filename;
char file[256];
M_StringCopy(file, myargv[p+1], sizeof(file));
// With Vanilla Hexen you have to specify the file without
// extension, but make that optional.
- if (!M_StringEndsWith(myargv[p+1], ".lmp"))
+ uc_filename = strdup(myargv[p + 1]);
+ M_ForceUppercase(uc_filename);
+
+ if (!M_StringEndsWith(uc_filename, ".LMP"))
{
M_StringConcat(file, ".lmp", sizeof(file));
}
+ free(uc_filename);
+
if (W_AddFile(file) != NULL)
{
M_StringCopy(demolumpname, lumpinfo[numlumps - 1].name,