summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-09-05 22:55:39 +0200
committerMattes D <github@xoft.cz>2014-09-05 22:55:39 +0200
commit4230eb3d924a2230a20e5044dfffa118ad090429 (patch)
treea75bbceae7a81694ee77094c1034797c7726b749 /src/WorldStorage
parentRewritten chunk status to specify whether the chunk is in queue. (diff)
downloadcuberite-4230eb3d924a2230a20e5044dfffa118ad090429.tar
cuberite-4230eb3d924a2230a20e5044dfffa118ad090429.tar.gz
cuberite-4230eb3d924a2230a20e5044dfffa118ad090429.tar.bz2
cuberite-4230eb3d924a2230a20e5044dfffa118ad090429.tar.lz
cuberite-4230eb3d924a2230a20e5044dfffa118ad090429.tar.xz
cuberite-4230eb3d924a2230a20e5044dfffa118ad090429.tar.zst
cuberite-4230eb3d924a2230a20e5044dfffa118ad090429.zip
Diffstat (limited to 'src/WorldStorage')
-rw-r--r--src/WorldStorage/WSSAnvil.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/WorldStorage/WSSAnvil.cpp b/src/WorldStorage/WSSAnvil.cpp
index b8f8ba019..f78ee405b 100644
--- a/src/WorldStorage/WSSAnvil.cpp
+++ b/src/WorldStorage/WSSAnvil.cpp
@@ -323,7 +323,13 @@ bool cWSSAnvil::LoadChunkFromNBT(const cChunkCoords & a_Chunk, const cParsedNBT
return false;
}
int Sections = a_NBT.FindChildByName(Level, "Sections");
- if ((Sections < 0) || (a_NBT.GetType(Sections) != TAG_List) || (a_NBT.GetChildrenType(Sections) != TAG_Compound))
+ if ((Sections < 0) || (a_NBT.GetType(Sections) != TAG_List))
+ {
+ LOAD_FAILED(a_Chunk.m_ChunkX, a_Chunk.m_ChunkZ);
+ return false;
+ }
+ eTagType SectionsType = a_NBT.GetChildrenType(Sections);
+ if ((SectionsType != TAG_Compound) && (SectionsType != TAG_End))
{
LOAD_FAILED(a_Chunk.m_ChunkX, a_Chunk.m_ChunkZ);
return false;