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.)
This commit is contained in:
Roberto Ierusalimschy
2025-07-29 11:50:20 -03:00
parent e3716ee161
commit c33bb08ffe
3 changed files with 4 additions and 4 deletions

View File

@@ -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 */