From a09b720790393cce8dac09b4d61e8a2b23d32d78 Mon Sep 17 00:00:00 2001 From: suchmememanyskill Date: Mon, 2 Aug 2021 00:39:47 +0200 Subject: [PATCH] forgot to push --- source/fs/menus/filemenu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/fs/menus/filemenu.c b/source/fs/menus/filemenu.c index 046f059..820d0d5 100644 --- a/source/fs/menus/filemenu.c +++ b/source/fs/menus/filemenu.c @@ -90,7 +90,8 @@ void RunScript(char *path, FSEntry_t entry){ char *thing = CombinePaths(path, entry.name); u32 size; char *script = sd_file_read(thing, &size); - TConf.scriptCWD = thing; + free(thing); + TConf.scriptCWD = path; if (!script) return; @@ -110,7 +111,6 @@ void RunScript(char *path, FSEntry_t entry){ exitFunction(ret.main.operations.data, ret.main.operations.count); vecFree(ret.staticVarHolder); vecFree(ret.main.operations); - free(thing); } void RenameFile(char *path, FSEntry_t entry){