From f76b693dfb7871a58227e5e4b6edfe83f51308ec Mon Sep 17 00:00:00 2001 From: LoganDark Date: Mon, 8 Nov 2021 12:28:12 -0800 Subject: [PATCH] t == hvalue(registry(L)) --- 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 687d5b55..5de44441 100644 --- a/VM/src/lapi.cpp +++ b/VM/src/lapi.cpp @@ -704,7 +704,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); - if (value && obj2gco(t) == gcvalue(registry(L))) + if (value && t == hvalue(registry(L))) luaG_runerror(L, "Attempt to set the registry to readonly"); t->readonly = value; return;