1
0
mirror of https://github.com/moparisthebest/minetest synced 2024-12-22 23:58:48 -05:00

Fix getCraftRecipe returing wrong reciep due to way to unspecific output matching

This commit is contained in:
sapier 2015-02-02 21:31:20 +01:00
parent 0118c111e8
commit d902bd31c4

View File

@ -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);