Fix error with the latest version of modlib

This commit is contained in:
luk3yx 2021-11-14 12:05:13 +13:00
parent 7bcceb2270
commit bf4003b988
1 changed files with 1 additions and 1 deletions

View File

@ -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