From c33bb08ffe04f24e09571b59eed3c9b59b622d91 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 29 Jul 2025 11:50:20 -0300 Subject: Added some casts for 32-bit machines When both 'int' and 'l_obj' have 32 bits, an unsigned int needs a cast to be assigned to 'l_obj'. (As long as 'l_obj' can count the total memory used by the system, these casts should be safe.) --- lobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lobject.c') diff --git a/lobject.c b/lobject.c index b558cfe0..763b4846 100644 --- a/lobject.c +++ b/lobject.c @@ -87,7 +87,7 @@ lu_byte luaO_codeparam (unsigned int p) { ** overflow, so we check which order is best. */ l_mem luaO_applyparam (lu_byte p, l_mem x) { - unsigned int m = p & 0xF; /* mantissa */ + int m = p & 0xF; /* mantissa */ int e = (p >> 4); /* exponent */ if (e > 0) { /* normalized? */ e--; /* correct exponent */ -- cgit v1.2.3-55-g6feb