Skip to content

Commit 336e2e7

Browse files
authored
Merge pull request #33 from Wires77/no_env_subscripts
Fix Lua library loading from system environment variable
2 parents 1a74f65 + 04eda46 commit 336e2e7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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)