aboutsummaryrefslogtreecommitdiff
path: root/lobject.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2025-07-29 11:50:20 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2025-07-29 11:50:20 -0300
commitc33bb08ffe04f24e09571b59eed3c9b59b622d91 (patch)
treec8b27b06d950d0907eb04ecbc91462d2b78ccea2 /lobject.c
parente3716ee161bb5416b5eb846eff6039d61954cfbd (diff)
downloadlua-c33bb08ffe04f24e09571b59eed3c9b59b622d91.tar.gz
lua-c33bb08ffe04f24e09571b59eed3c9b59b622d91.tar.bz2
lua-c33bb08ffe04f24e09571b59eed3c9b59b622d91.zip
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.)
Diffstat (limited to 'lobject.c')
-rw-r--r--lobject.c2
1 files changed, 1 insertions, 1 deletions
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) {
87** overflow, so we check which order is best. 87** overflow, so we check which order is best.
88*/ 88*/
89l_mem luaO_applyparam (lu_byte p, l_mem x) { 89l_mem luaO_applyparam (lu_byte p, l_mem x) {
90 unsigned int m = p & 0xF; /* mantissa */ 90 int m = p & 0xF; /* mantissa */
91 int e = (p >> 4); /* exponent */ 91 int e = (p >> 4); /* exponent */
92 if (e > 0) { /* normalized? */ 92 if (e > 0) { /* normalized? */
93 e--; /* correct exponent */ 93 e--; /* correct exponent */