aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsapier <Sapier at GMX dot net>2015-02-02 21:31:20 +0100
committersapier <Sapier at GMX dot net>2015-02-02 21:32:23 +0100
commitd902bd31c4b9e8c2a0d85af831a5a23f827a48a2 (patch)
tree61c0f1de7d5c35e84edc84bb3be4e1686cf303c3
parent0118c111e8f12602b03cee8deb4c86f9b9e28cf3 (diff)
downloadminetest-d902bd31c4b9e8c2a0d85af831a5a23f827a48a2.tar.gz
minetest-d902bd31c4b9e8c2a0d85af831a5a23f827a48a2.tar.bz2
minetest-d902bd31c4b9e8c2a0d85af831a5a23f827a48a2.zip
Fix getCraftRecipe returing wrong reciep due to way to unspecific output matching
-rw-r--r--src/craftdef.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/craftdef.cpp b/src/craftdef.cpp
index 9cd1d8c7e..afc41303f 100644
--- a/src/craftdef.cpp
+++ b/src/craftdef.cpp
@@ -954,7 +954,9 @@ public:
try {
tmpout = def->getOutput(input, gamedef);
- if(tmpout.item.substr(0,output.item.length()) == output.item)
+ if((tmpout.item.substr(0,output.item.length()) == output.item) &&
+ ((tmpout.item[output.item.length()] == 0) ||
+ (tmpout.item[output.item.length()] == ' ')))
{
// Get output, then decrement input (if requested)
input = def->getInput(output, gamedef);