mirror of
https://github.com/luau-lang/luau.git
synced 2024-11-15 14:25:44 +08:00
Don't allow registry to be set to readonly (#184)
This commit is contained in:
parent
7816f2596f
commit
773fb5bd6f
@ -703,6 +703,7 @@ void lua_setreadonly(lua_State* L, int objindex, bool value)
|
||||
const TValue* o = index2adr(L, objindex);
|
||||
api_check(L, ttistable(o));
|
||||
Table* t = hvalue(o);
|
||||
api_check(L, t != hvalue(registry(L)));
|
||||
t->readonly = value;
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user