From c688b00f73205273c46d7cf5656ff5a27e90ce36 Mon Sep 17 00:00:00 2001 From: Roberto I Date: Wed, 20 Aug 2025 14:18:12 -0300 Subject: Detail in 'obj2gco' Its check should use the type of the object, not its tag. (Change only relevant in test mode.) --- lstate.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lstate.h b/lstate.h index 80df3b0a..a4d5570c 100644 --- a/lstate.h +++ b/lstate.h @@ -430,9 +430,9 @@ union GCUnion { /* ** macro to convert a Lua object into a GCObject -** (The access to 'tt' tries to ensure that 'v' is actually a Lua object.) */ -#define obj2gco(v) check_exp((v)->tt >= LUA_TSTRING, &(cast_u(v)->gc)) +#define obj2gco(v) \ + check_exp(novariant((v)->tt) >= LUA_TSTRING, &(cast_u(v)->gc)) /* actual number of total memory allocated */ -- cgit v1.2.3-55-g6feb