projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0118c11
)
Fix getCraftRecipe returing wrong reciep due to way to unspecific output matching
author
sapier
<Sapier at GMX dot net>
Mon, 2 Feb 2015 20:31:20 +0000
(21:31 +0100)
committer
sapier
<Sapier at GMX dot net>
Mon, 2 Feb 2015 20:32:23 +0000
(21:32 +0100)
src/craftdef.cpp
patch
|
blob
|
history
diff --git
a/src/craftdef.cpp
b/src/craftdef.cpp
index 9cd1d8c7ef12f2823c1e6622ce1bf787638c260d..afc41303fd564436f1d46d4f0597a76f32fae4f6 100644
(file)
--- 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);