From 492eaab0341f1a06806a35abd9a3dd1163dfbdaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petri=20H=C3=A4kkinen?= Date: Wed, 14 Sep 2022 13:21:48 +0300 Subject: [PATCH] Fix api check in lua_rawsetfield --- VM/src/lapi.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VM/src/lapi.cpp b/VM/src/lapi.cpp index 5d45d66d..7603a79e 100644 --- a/VM/src/lapi.cpp +++ b/VM/src/lapi.cpp @@ -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);