From b665eff7fb511b34dc1ce062e05a6946403e341c Mon Sep 17 00:00:00 2001 From: osmarks Date: Fri, 27 Jul 2018 17:01:07 +0100 Subject: [PATCH] Fix collate_stacks --- lib.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib.lua b/lib.lua index b361967..2ce02b7 100644 --- a/lib.lua +++ b/lib.lua @@ -185,7 +185,7 @@ end -- Functions like "collate" but on itemstacks (adds their counts) local function collate_stacks(s) local out = {} - for _, stack in pairs(matching_items) do + for _, stack in pairs(s) do local i = w.get_internal_identifier(stack) if out[i] then out[i].count = out[i].count + stack.count else out[i] = stack end