Remove metatable check

This commit is contained in:
ccuser44 2025-01-02 15:13:04 +02:00 committed by GitHub
parent 9a102e2aff
commit 489e79192a
Signed by: DevComp
GPG key ID: B5690EEEBB952194

View file

@ -585,10 +585,7 @@ static int tisfrozen(lua_State* L)
static int tclone(lua_State* L) static int tclone(lua_State* L)
{ {
luaL_checktype(L, 1, LUA_TTABLE); luaL_checktype(L, 1, LUA_TTABLE);
luaL_argcheck(L, !luaL_getmetafield(L, 1, "__metatable"), 1, "table has a protected metatable");
Table* tt = luaH_clone(L, hvalue(L->base)); Table* tt = luaH_clone(L, hvalue(L->base));
TValue v; TValue v;
sethvalue(L, &v, tt); sethvalue(L, &v, tt);
luaA_pushobject(L, &v); luaA_pushobject(L, &v);