mirror of
https://github.com/luau-lang/luau.git
synced 2025-04-10 22:00:54 +01:00
Don't allow registry to be set to readonly (#184)
This commit is contained in:
parent
7816f2596f
commit
773fb5bd6f
1 changed files with 1 additions and 0 deletions
|
@ -703,6 +703,7 @@ void lua_setreadonly(lua_State* L, int objindex, bool value)
|
||||||
const TValue* o = index2adr(L, objindex);
|
const TValue* o = index2adr(L, objindex);
|
||||||
api_check(L, ttistable(o));
|
api_check(L, ttistable(o));
|
||||||
Table* t = hvalue(o);
|
Table* t = hvalue(o);
|
||||||
|
api_check(L, t != hvalue(registry(L)));
|
||||||
t->readonly = value;
|
t->readonly = value;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue