From 1bf0794d6a3d011a8719a08c9d5f2a075264a272 Mon Sep 17 00:00:00 2001 From: James R Date: Mon, 17 Aug 2020 21:27:59 -0700 Subject: [PATCH] Copy the saved wad directory to srb2path --- src/sdl/i_system.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index d37e688a..419204cd 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -3802,16 +3802,15 @@ boolean I_UseSavedWadDirectory(void) { boolean ok = false; #ifdef _WIN32 - char path[MAX_PATH]; FILE * file = openAppDataFile("lastwaddir", "r"); if (file != NULL) { - if (fgets(path, sizeof path, file) != NULL) + if (fgets(srb2path, sizeof srb2path, file) != NULL) { I_OutputMsg( "Going to the last known directory with srb2.srb: %s\n", - path); - ok = SetCurrentDirectoryA(path); + srb2path); + ok = SetCurrentDirectoryA(srb2path); } fclose(file); }