Skip to content

Commit

Permalink
Don't allow registry to be set to readonly (#184)
Browse files Browse the repository at this point in the history
  • Loading branch information
LoganDark committed Nov 8, 2021
1 parent 7816f25 commit 773fb5b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions VM/src/lapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 773fb5b

Please sign in to comment.