shithub: choc

Download patch

ref: b18f4641c3043d097038a8e391687a8735197898
parent: b9f75eb05e0ce716e001ad89635758648d6f9ab9
author: mfrancis95 <[email protected]>
date: Wed Dec 12 08:28:07 EST 2018

Strife: Make finding VOICES.wad case-insensitive when the -iwad parameter is used (fix #1120)

--- a/src/strife/d_main.c
+++ b/src/strife/d_main.c
@@ -855,10 +855,8 @@
             voiceswad = M_SafeFilePath(iwadpath, "voices.wad");
             Z_Free(iwadpath);
 
-            if(!M_FileExists(voiceswad))
-                Z_Free(voiceswad);
-            else
-                name = voiceswad;
+            name = M_FileCaseExists(voiceswad);
+            Z_Free(voiceswad);
         }
 
         // not found? try global search paths
@@ -877,7 +875,7 @@
         {
             // add it.
             D_AddFile(name);
-            p ? Z_Free(name) : free(name);
+            free(name);
         }
     }
 }