diff options
author | TeTpaAka <TeTpaAka@users.noreply.github.com> | 2015-07-04 11:28:09 +0200 |
---|---|---|
committer | est31 <MTest31@outlook.com> | 2015-07-04 14:33:49 +0200 |
commit | 87b9cdab07f70a7f2dd6531650242b0893eb5930 (patch) | |
tree | 678f62ca63290d767f911832b2fc3b5c7687ef68 | |
parent | 7b171ea2be0e476d7cdc9300b53ba86a9f694161 (diff) | |
download | minetest-87b9cdab07f70a7f2dd6531650242b0893eb5930.tar.gz minetest-87b9cdab07f70a7f2dd6531650242b0893eb5930.tar.bz2 minetest-87b9cdab07f70a7f2dd6531650242b0893eb5930.zip |
Fix missing check for 0 in craft replacements
-rw-r--r-- | src/craftdef.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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); } } |