summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-08-13 13:10:21 +0200
committerTycho <work.tycho+git@gmail.com>2014-08-13 13:10:21 +0200
commit8f7b9acb488a2dc4a9c34de499a3cd0e0829ef40 (patch)
treed5a83e423ab2450830a2a2839d788af62a31708d
parentMerge pull request #1296 from mc-server/LuaAPI (diff)
downloadcuberite-8f7b9acb488a2dc4a9c34de499a3cd0e0829ef40.tar
cuberite-8f7b9acb488a2dc4a9c34de499a3cd0e0829ef40.tar.gz
cuberite-8f7b9acb488a2dc4a9c34de499a3cd0e0829ef40.tar.bz2
cuberite-8f7b9acb488a2dc4a9c34de499a3cd0e0829ef40.tar.lz
cuberite-8f7b9acb488a2dc4a9c34de499a3cd0e0829ef40.tar.xz
cuberite-8f7b9acb488a2dc4a9c34de499a3cd0e0829ef40.tar.zst
cuberite-8f7b9acb488a2dc4a9c34de499a3cd0e0829ef40.zip
-rw-r--r--src/CraftingRecipes.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/CraftingRecipes.cpp b/src/CraftingRecipes.cpp
index 1a31a6e90..085b6e0d5 100644
--- a/src/CraftingRecipes.cpp
+++ b/src/CraftingRecipes.cpp
@@ -324,7 +324,11 @@ void cCraftingRecipes::LoadRecipes(void)
return;
}
AString Everything;
- f.ReadRestOfFile(Everything);
+ if (!f.ReadRestOfFile(Everything))
+ {
+ LOGWARNING("Cannot read file \"crafting.txt\", no crafting recipes will be available!");
+ return;
+ }
f.Close();
// Split it into lines, then process each line as a single recipe: