From e520ad6606cf339fcba77fa89c1736c3e8c9d72a Mon Sep 17 00:00:00 2001 From: disba1ancer Date: Sun, 11 Jul 2021 19:43:38 +0300 Subject: [PATCH] Fixed strange dupe while sorting storage --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 2fac0fc..34b8bb5 100644 --- a/init.lua +++ b/init.lua @@ -804,7 +804,7 @@ local function sort_storage(pos, player) for _, sste in ipairs(sorted_storage_table) do local new_itemstack = sste.itemstack if new_itemstack:get_name() == item_name then - itemstack = new_itemstack:add_item(itemstack) + itemstack:replace(new_itemstack:add_item(itemstack)) end if itemstack:is_empty() then break