From: TeTpaAka Date: Sat, 4 Jul 2015 09:28:09 +0000 (+0200) Subject: Fix missing check for 0 in craft replacements X-Git-Tag: 0.4.13~149 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=87b9cdab07f70a7f2dd6531650242b0893eb5930;p=oweals%2Fminetest.git Fix missing check for 0 in craft replacements --- 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); } }