From bf4003b988eab0db79ac31bfc1ff05316112c423 Mon Sep 17 00:00:00 2001 From: luk3yx Date: Sun, 14 Nov 2021 12:05:13 +1300 Subject: [PATCH] Fix error with the latest version of modlib --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 79e9471..db7a75b 100644 --- a/init.lua +++ b/init.lua @@ -20,7 +20,7 @@ if minetest.global_exists("modlib") and (modlib.version or 0) >= 54 then local pcall, from_string = pcall, modlib.minetest.colorspec.from_string function colorstring_to_number(col) local ok, spec = pcall(from_string, col) - if not ok then return end + if not ok or not spec then return end return spec:to_number_rgb() end else