mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
Fix api check in lua_rawsetfield
This commit is contained in:
parent
a783bc7a06
commit
492eaab034
1 changed files with 1 additions and 1 deletions
|
@ -851,7 +851,7 @@ void lua_rawsetfield(lua_State* L, int idx, const char* k)
|
|||
{
|
||||
api_checknelems(L, 1);
|
||||
StkId t = index2addr(L, idx);
|
||||
api_checkvalidindex(L, t);
|
||||
api_check(L, ttistable(t));
|
||||
if (hvalue(t)->readonly)
|
||||
luaG_runerror(L, "Attempt to modify a readonly table");
|
||||
setobj2t(L, luaH_setstr(L, hvalue(t), luaS_new(L, k)), L->top - 1);
|
||||
|
|
Loading…
Add table
Reference in a new issue