Fix bit32.bor

This commit is contained in:
Novatux 2015-01-03 14:11:04 +01:00
parent 3f5aaf3d75
commit 23f2f6e3f2

View File

@ -30,8 +30,9 @@ end
bit32.bor = function(x, y)
-- Common usecases, they deserve to be optimized
if y == 0xff then return x%0x100 end
if y == 0xffff then return x%0x10000 end
if y == 0xff then return x - (x%0x100) + 0xff end
if y == 0xffff then return x - (x%0x10000) + 0xffff end
if y == 0xffffffff then return 0xffffffff end
x, y = x%P, y%P
local r = 0