digiline: Prevent error upon ItemStack creation

This commit is contained in:
SmallJoker 2024-10-20 14:55:15 +02:00
parent c0b2a2013a
commit b92bf0a3e6

@ -378,6 +378,10 @@ local function controller_on_digiline_receive(pos, _, channel, msg)
return
end
if msg and type(msg) ~= "string" and type(msg) ~= "table" then
return -- Protect against ItemStack(...) errors
end
local item = ItemStack(msg)
local drawers_index = controller_get_drawer_index(pos, item:get_name())