From 15c1a7e04aae38da36091881597f6965c11d1ffb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Hrdli=C4=8Dka?= <13226155+dhrdlicka@users.noreply.github.com> Date: Sun, 24 Aug 2025 21:36:12 +0200 Subject: [PATCH] Use an actual buffer for portable mode detection lol --- src/86box.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/86box.c b/src/86box.c index a0fe983c4..5570b5269 100644 --- a/src/86box.c +++ b/src/86box.c @@ -763,16 +763,14 @@ pc_init(int argc, char *argv[]) * We enable portable mode if the EXE path * contains the global config file. */ - path_append_filename(global, exe_path, GLOBAL_CONFIG_FILE); + path_append_filename(temp, exe_path, GLOBAL_CONFIG_FILE); - FILE *fp = fopen(global, "r"); + FILE *fp = fopen(temp, "r"); if (fp) { portable_mode = 1; fclose(fp); } - global = NULL; - /* * Get the current working directory. *