From 9edaf7a47b02bd351c400f0c6aec517884449551 Mon Sep 17 00:00:00 2001 From: jussi Date: Mon, 20 May 2024 15:45:31 +0300 Subject: Use GetApplicationDirectory instead of GetWorkingDirectory for basePath if no path argument given. --- src/lua_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lua_core.c') diff --git a/src/lua_core.c b/src/lua_core.c index 633cb8b..6d89777 100644 --- a/src/lua_core.c +++ b/src/lua_core.c @@ -1160,10 +1160,10 @@ bool luaCallMain() { snprintf( path, STRING_LEN, "main" ); } #else - snprintf( path, STRING_LEN, "%smain.lua", state->exePath ); + snprintf( path, STRING_LEN, "%smain.lua", state->basePath ); /* Alternatively look for main. Could be precompiled binary file. */ if ( !FileExists( path ) ) { - snprintf( path, STRING_LEN, "%smain", state->exePath ); + snprintf( path, STRING_LEN, "%smain", state->basePath ); } #endif luaL_dofile( L, path ); -- cgit v1.2.3