mirror of
https://github.com/minetest-mods/MoreMesecons.git
synced 2025-01-04 03:39:35 +01:00
do not normalize luajit functions
This commit is contained in:
parent
686c18c49e
commit
9fcb45d9f2
6
md5.lua
6
md5.lua
@ -35,7 +35,10 @@ local char, byte, format, rep, sub =
|
||||
local bit_or, bit_and, bit_not, bit_xor, bit_rshift, bit_lshift
|
||||
|
||||
local ok, bit = pcall(require, 'bit')
|
||||
if not ok then ok, bit = pcall(require, 'bit32') end
|
||||
if ok then
|
||||
bit_or, bit_and, bit_not, bit_xor, bit_rshift, bit_lshift = bit.bor, bit.band, bit.bnot, bit.xor, bit.rshift, bit.lshift
|
||||
else
|
||||
ok, bit = pcall(require, 'bit32')
|
||||
|
||||
if ok then
|
||||
|
||||
@ -205,6 +208,7 @@ local function str2bei(s)
|
||||
end
|
||||
return v
|
||||
end
|
||||
end
|
||||
|
||||
-- convert raw string to little-endian int
|
||||
local function str2lei(s)
|
||||
|
Loading…
Reference in New Issue
Block a user