fix multiple problems with lua_Integer 32 bit type in lua < 5.3 on 32-bit platforms

This commit is contained in:
bol-van committed 2025-12-06 22:43:45 +03:00
1 parent efa675468d
commit e5736b5fdd
5 files changed
+103 -77

No files matched your search

+2 -2
View File
@@ -275,8 +275,8 @@ function test_bit()
v2 = bitlshift(v, b1)
pow = 2^b1
v3 = v * pow
print(string.format("lshift(0x%X,%u) = 0x%X 0x%X*%u = 0x%X", v,b1,v2, v,pow,v3))
v3 = (v * pow) % 0x100000000
print(string.format("lshift(0x%X,%u) = 0x%X 0x%X*%u %% 0x10000000 = 0x%X", v,b1,v2, v,pow,v3))
test_assert(v2==v3)
v2 = math.random(0,0xFFFFFFFF)