Template
1
0
mirror of https://github.com/bol-van/zapret2.git synced 2026-03-19 07:45:49 +00:00

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

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

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)