aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTeTpaAka <TeTpaAka@users.noreply.github.com>2015-07-04 11:28:09 +0200
committerest31 <MTest31@outlook.com>2015-07-04 14:33:49 +0200
commit87b9cdab07f70a7f2dd6531650242b0893eb5930 (patch)
tree678f62ca63290d767f911832b2fc3b5c7687ef68 /src
parent7b171ea2be0e476d7cdc9300b53ba86a9f694161 (diff)
downloadminetest-87b9cdab07f70a7f2dd6531650242b0893eb5930.tar.gz
minetest-87b9cdab07f70a7f2dd6531650242b0893eb5930.tar.bz2
minetest-87b9cdab07f70a7f2dd6531650242b0893eb5930.zip
Fix missing check for 0 in craft replacements
Diffstat (limited to 'src')
-rw-r--r--src/craftdef.cpp4
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);
}
}