Skip to content

Commit 04eda46

Browse files
committed
Fix Lua library loading from system environment variable
1 parent 9eb5ba6 commit 04eda46

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

ui_subscript.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,10 @@ bool ui_subscript_c::Start()
339339
lua_pushlightuserdata(L, this);
340340
lua_rawseti(L, LUA_REGISTRYINDEX, 0);
341341
lua_pushcfunction(L, traceback);
342+
343+
lua_pushboolean(L, 1);
344+
lua_setfield(L, LUA_REGISTRYINDEX, "LUA_NOENV");
345+
342346
// Add libraries and APIs
343347
lua_gc(L, LUA_GCSTOP, 0);
344348
luaL_openlibs(L);

0 commit comments

Comments
 (0)