summaryrefslogtreecommitdiffstats
path: root/src/CraftingRecipes.cpp
diff options
context:
space:
mode:
authorHownaer <franzi.moos@googlemail.com>2014-08-29 00:42:33 +0200
committerHownaer <franzi.moos@googlemail.com>2014-08-29 00:42:33 +0200
commitc4d7f7996b0dcd784f5e1ccc8553b062c3ac96b6 (patch)
tree09e0a14bb1ff3690d2afb4a3a343537995593a84 /src/CraftingRecipes.cpp
parentFire can be destroyed with the sword in creative-mode (diff)
downloadcuberite-c4d7f7996b0dcd784f5e1ccc8553b062c3ac96b6.tar
cuberite-c4d7f7996b0dcd784f5e1ccc8553b062c3ac96b6.tar.gz
cuberite-c4d7f7996b0dcd784f5e1ccc8553b062c3ac96b6.tar.bz2
cuberite-c4d7f7996b0dcd784f5e1ccc8553b062c3ac96b6.tar.lz
cuberite-c4d7f7996b0dcd784f5e1ccc8553b062c3ac96b6.tar.xz
cuberite-c4d7f7996b0dcd784f5e1ccc8553b062c3ac96b6.tar.zst
cuberite-c4d7f7996b0dcd784f5e1ccc8553b062c3ac96b6.zip
Diffstat (limited to '')
-rw-r--r--src/CraftingRecipes.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/CraftingRecipes.cpp b/src/CraftingRecipes.cpp
index 2d80ecaf8..223184c64 100644
--- a/src/CraftingRecipes.cpp
+++ b/src/CraftingRecipes.cpp
@@ -1,4 +1,4 @@
-
+
// CraftingRecipes.cpp
// Interfaces to the cCraftingRecipes class representing the storage of crafting recipes
@@ -366,7 +366,10 @@ void cCraftingRecipes::ClearRecipes(void)
void cCraftingRecipes::AddRecipeLine(int a_LineNum, const AString & a_RecipeLine)
{
- AStringVector Sides = StringSplit(a_RecipeLine, "=");
+ AString RecipeLine(a_RecipeLine);
+ RecipeLine.erase(std::remove(RecipeLine.begin(), RecipeLine.end(), ' '), RecipeLine.end());
+
+ AStringVector Sides = StringSplit(RecipeLine, "=");
if (Sides.size() != 2)
{
LOGWARNING("crafting.txt: line %d: A single '=' was expected, got %d", a_LineNum, (int)Sides.size() - 1);