Skip to content

Commit

Permalink
Fix LiqidWave 1.5.0 crash when trying to load sharedCommon module
Browse files Browse the repository at this point in the history
No idea why they're attempting to load a script in the textures
directory of all places, but whatever
  • Loading branch information
SkyLeite committed Jan 7, 2024
1 parent 76c359f commit 1ad7e75
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Main/src/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1787,7 +1787,9 @@ void Application::SetScriptPath(lua_State *s)
{
//Set path for 'require' (https://stackoverflow.com/questions/4125971/setting-the-global-lua-path-variable-from-c-c?lq=1)
String lua_path = Path::Normalize(
Path::Absolute("./skins/" + m_skin + "/scripts/?.lua;") + Path::Absolute("./skins/" + m_skin + "/scripts/?"));
Path::Absolute("./skins/" + m_skin + "/scripts/?.lua;") + Path::Absolute("./skins/" + m_skin + "/scripts/?;")) + Path::Absolute("./skins/" + m_skin + "/textures/_shared/scripts/?.lua;") + Path::Absolute("./skins/" + m_skin + "/textures/_shared/scripts/?");

Logf("Lua path: %s", Logger::Severity::Warning, *lua_path);

lua_getglobal(s, "package");
lua_getfield(s, -1, "path"); // get field "path" from table at top of stack (-1)
Expand Down

0 comments on commit 1ad7e75

Please sign in to comment.