mirror of
https://github.com/luau-lang/luau.git
synced 2025-04-01 17:30:53 +01:00
Fix: luaL_sandbox leaves value on the stack (#253)
Co-authored-by: Petri Häkkinen <petrih@rmd.remedy.fi>
This commit is contained in:
parent
9aa9ff12dd
commit
677994b243
1 changed files with 1 additions and 1 deletions
|
@ -44,7 +44,7 @@ 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