From 87b9cdab07f70a7f2dd6531650242b0893eb5930 Mon Sep 17 00:00:00 2001 From: TeTpaAka Date: Sat, 4 Jul 2015 11:28:09 +0200 Subject: Fix missing check for 0 in craft replacements --- src/craftdef.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/craftdef.cpp b/src/craftdef.cpp index cc0e83be7..bad0d393b 100644 --- a/src/craftdef.cpp +++ b/src/craftdef.cpp @@ -235,8 +235,8 @@ static void craftDecrementOrReplaceInput(CraftInput &input, } } } - // No replacement was found, simply decrement count to zero - if (!found_replacement) + // No replacement was found, simply decrement count by one + if (!found_replacement && it->count > 0) it->remove(1); } } -- cgit v1.2.3