Merge remote-tracking branch 'origin/Saturn-Next' into lugstuff

This commit is contained in:
Alug committed 2024-05-30 19:10:03 +02:00
commit 41e52f9e88
1 file changed
+7 -2
+7 -2
View File
@@ -4076,10 +4076,15 @@ static const char *locateWad(void)
#endif
#ifndef NOHOME
// find in $HOME
I_OutputMsg(",HOME");
I_OutputMsg(",HOME/" DEFAULTDIR);
if ((envstr = I_GetEnv("HOME")) != NULL)
{
WadPath = searchWad(envstr);
char *tmp = malloc(strlen(envstr) + sizeof(PATHSEP) + sizeof(DEFAULTDIR));
strcpy(tmp, envstr);
strcat(tmp, PATHSEP);
strcat(tmp, DEFAULTDIR);
WadPath = searchWad(tmp);
free(tmp);
if (WadPath)
return WadPath;
}