From 10365e943aacd35d7b1052cdc4543556b94ee6f8 Mon Sep 17 00:00:00 2001 From: Hanicef Date: Wed, 20 Mar 2024 20:44:17 +0100 Subject: [PATCH] Use DEFAULTDIR instead of hardcoding .srb2 --- src/dedicated/i_system.c | 6 +++--- src/sdl/i_system.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/dedicated/i_system.c b/src/dedicated/i_system.c index b231080a8..61b7a239a 100644 --- a/src/dedicated/i_system.c +++ b/src/dedicated/i_system.c @@ -1433,12 +1433,12 @@ static const char *locateWad(void) #ifndef NOHOME // find in $HOME - I_OutputMsg(",HOME/.srb2"); + I_OutputMsg(",HOME/" DEFAULTDIR); if ((envstr = I_GetEnv("HOME")) != NULL) { - char *tmp = malloc(strlen(envstr) + sizeof("/.srb2")); + char *tmp = malloc(strlen(envstr) + sizeof(DEFAULTDIR)); strcpy(tmp, envstr); - strcat(tmp, "/.srb2"); + strcat(tmp, DEFAULTDIR); SEARCHWAD(envstr); free(tmp); } diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index c6750ce74..64fcb2f2b 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -3038,13 +3038,13 @@ static const char *locateWad(void) } #ifndef NOHOME - // find in $HOME/.srb2 - I_OutputMsg(",HOME/.srb2"); + // find in $HOME + I_OutputMsg(",HOME/" DEFAULTDIR); if ((envstr = I_GetEnv("HOME")) != NULL) { - char *tmp = malloc(strlen(envstr) + sizeof("/.srb2")); + char *tmp = malloc(strlen(envstr) + sizeof(DEFAULTDIR)); strcpy(tmp, envstr); - strcat(tmp, "/.srb2"); + strcat(tmp, DEFAULTDIR); SEARCHWAD(envstr); free(tmp); }