mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
Fix: luaL_sandbox leaves value on the stack
This commit is contained in:
parent
6958716ccd
commit
5f826dc3fb
1 changed files with 1 additions and 1 deletions
|
@ -44,7 +44,7 @@ LUALIB_API void luaL_sandbox(lua_State* L)
|
|||
lua_pushliteral(L, "");
|
||||
lua_getmetatable(L, -1);
|
||||
lua_setreadonly(L, -1, true);
|
||||
lua_pop(L, 1);
|
||||
lua_pop(L, 2);
|
||||
|
||||
// set globals to readonly and activate safeenv since the env is immutable
|
||||
lua_setreadonly(L, LUA_GLOBALSINDEX, true);
|
||||
|
|
Loading…
Add table
Reference in a new issue