bit polyfill: fix undeclared global accessed warning

This commit is contained in:
Starbeamrainbowlabs 2021-07-19 00:26:19 +01:00
parent fa2c0642c1
commit 9020948dc5
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -12,7 +12,13 @@
-- Docs: http://bitop.luajit.org/api.html -- Docs: http://bitop.luajit.org/api.html
-- module: bit -- module: bit
local bit = bit or {}
local bit
if minetest.global_exists("bit") then
bit = bit
else
bit = {}
end
bit.bits = 32 bit.bits = 32
bit.powtab = { 1 } bit.powtab = { 1 }