Skip to content
Snippets Groups Projects
Commit d902bd31 authored by sapier's avatar sapier
Browse files

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

parent 0118c111
No related branches found
No related tags found
No related merge requests found
......@@ -954,7 +954,9 @@ class CCraftDefManager: public IWritableCraftDefManager
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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment