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
1 changed files with 3 additions and 1 deletions

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