From dd660c3c1cb62a9f808140b547c7fdb4d3141998 Mon Sep 17 00:00:00 2001 From: tour <129965577+a-tour-ist@users.noreply.github.com> Date: Mon, 2 Dec 2024 02:00:02 +0100 Subject: [PATCH] fix crash from bad digiline msg (#144) --- autocrafter.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/autocrafter.lua b/autocrafter.lua index 014c4a5..b4954b6 100644 --- a/autocrafter.lua +++ b/autocrafter.lua @@ -598,11 +598,12 @@ minetest.register_node("pipeworks:autocrafter", { if #msg < 3 then return end local inv = meta:get_inventory() for y = 0, 2, 1 do + local row = msg[y + 1] for x = 1, 3, 1 do local slot = y * 3 + x - if minetest.registered_items[msg[y + 1][x]] then + if type(row) == "table" and minetest.registered_items[row[x]] then inv:set_stack("recipe", slot, ItemStack( - msg[y + 1][x])) + row[x])) else inv:set_stack("recipe", slot, ItemStack("")) end