diff options
author | Louie S <louie@example.com> | 2023-02-23 20:22:33 -0800 |
---|---|---|
committer | Louie S <louie@example.com> | 2023-02-23 20:22:33 -0800 |
commit | 1f29cdb08e29f86053a813ff61b617f5994f938b (patch) | |
tree | aa8654a32a916e2df248d1c791af5255fbefd621 /src | |
parent | 01d60765f8441e5d81e7c02770731af8c0676c21 (diff) |
Fix crash on windows
Diffstat (limited to 'src')
-rw-r--r-- | src/windows/read_cfg.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; } |