Minor fix

This commit is contained in:
Jean-Patrick Guerrero 2020-12-30 23:48:58 +01:00
parent 42e255f07f
commit d6083e2c03

@ -964,10 +964,13 @@ local function get_stack_max(inv, data, is_recipe, rcp)
for name in pairs(counts_rcp) do
if is_group(name) then
local def = reg_items[item]
local groups = extract_groups(name)
if item_has_groups(def.groups, groups) then
counts_inv[name] = (counts_inv[name] or 0) + count
if def then
local groups = extract_groups(name)
if item_has_groups(def.groups, groups) then
counts_inv[name] = (counts_inv[name] or 0) + count
end
end
end
end