From 1f29cdb08e29f86053a813ff61b617f5994f938b Mon Sep 17 00:00:00 2001 From: Louie S Date: Thu, 23 Feb 2023 20:22:33 -0800 Subject: Fix crash on windows --- src/windows/read_cfg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/windows') diff --git a/src/windows/read_cfg.c b/src/windows/read_cfg.c index 2a56ef8..f973759 100644 --- a/src/windows/read_cfg.c +++ b/src/windows/read_cfg.c @@ -23,7 +23,7 @@ char *find_config(){ sprintf(choices[0], "%s%cterminal-media-launcher%cconfig", appdata, sep, sep); for(i = 0; i < check_count; i++){ - path = choices[i]; + strcpy(path, choices[i]); printf("Checking for config at %s: ", choices[i]); if(access(path, R_OK) == 0){ printf("Using config \"%s\"\n\n", path); @@ -34,7 +34,7 @@ char *find_config(){ //TODO no config exists, ask user if they want to autogenerate one mkconfig_wizard(choices[0]); - path = choices[0]; + strcpy(path, choices[0]); return path; } -- cgit