From 52856194073d167d09d44e4f54d4867dfb1fbb84 Mon Sep 17 00:00:00 2001 From: Lars Mueller Date: Sun, 24 Oct 2021 11:20:21 +0200 Subject: [PATCH] Fix crash when bit library is unavailable --- minetest/png.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/minetest/png.lua b/minetest/png.lua index 49c3474..0be32fa 100644 --- a/minetest/png.lua +++ b/minetest/png.lua @@ -3,7 +3,7 @@ local signature = "\137\80\78\71\13\10\26\10" local assert, char, ipairs, insert, concat, abs, floor = assert, string.char, ipairs, table.insert, table.concat, math.abs, math.floor -- TODO move to modlib.bit eventually -local bit_xor = bit.xor or function(a, b) +local bit_xor = bit and bit.xor or function(a, b) local res = 0 local bit = 1 for _ = 1, 32 do