Skip to content

Instantly share code, notes, and snippets.

@kahrl
Created August 24, 2013 21:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kahrl/6330631 to your computer and use it in GitHub Desktop.
Save kahrl/6330631 to your computer and use it in GitHub Desktop.
diff --git a/src/craftdef.cpp b/src/craftdef.cpp
index 5c7c3a4..9cd1d8c 100644
--- a/src/craftdef.cpp
+++ b/src/craftdef.cpp
@@ -525,7 +525,7 @@ bool CraftDefinitionShapeless::check(const CraftInput &input, IGameDef *gamedef)
}
// Try with all permutations of the recipe
- std::vector<std::string> recipe_copy = recipe;
+ std::vector<std::string> recipe_copy = craftGetItemNames(recipe, gamedef);
// Start from the lexicographically first permutation (=sorted)
std::sort(recipe_copy.begin(), recipe_copy.end());
//while(std::prev_permutation(recipe_copy.begin(), recipe_copy.end())){}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment