From ba4b95ac5fd3296413bede39ef798188f3c17873 Mon Sep 17 00:00:00 2001 From: ccuser44 <68124053+ccuser44@users.noreply.github.com> Date: Thu, 2 Jan 2025 15:58:47 +0200 Subject: [PATCH] Supply raw argument to luaH_clone --- VM/src/ltablib.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VM/src/ltablib.cpp b/VM/src/ltablib.cpp index a0dbabcb..6e6c9216 100644 --- a/VM/src/ltablib.cpp +++ b/VM/src/ltablib.cpp @@ -585,7 +585,7 @@ static int tisfrozen(lua_State* L) static int tclone(lua_State* L) { luaL_checktype(L, 1, LUA_TTABLE); - Table* tt = luaH_clone(L, hvalue(L->base)); + Table* tt = luaH_clone(L, hvalue(L->base), luaL_getmetafield(L, 1, "__metatable") ? true : false); TValue v; sethvalue(L, &v, tt); luaA_pushobject(L, &v);