prevent metadata crash

This commit is contained in:
Freeman
2023-08-29 22:45:29 +02:00
parent beb1cbb50a
commit f68657b2bf

View File

@ -438,7 +438,8 @@ local function inv_insert(inv, listname, itemstack, quantity, from_table, pos, i
-- if has metadata add metadata
if from_table then
for i in pairs(stacks) do
for i in pairs(stacks) do
if not i then return end -- crash
local from_item_table = from_table[i].item:to_table()
if from_item_table.name == name then
if from_item_table.metadata then