diff options
author | Mattes D <github@xoft.cz> | 2014-09-05 22:55:39 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-09-05 22:55:39 +0200 |
commit | 4230eb3d924a2230a20e5044dfffa118ad090429 (patch) | |
tree | a75bbceae7a81694ee77094c1034797c7726b749 /src | |
parent | Rewritten chunk status to specify whether the chunk is in queue. (diff) | |
download | cuberite-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 '')
-rw-r--r-- | src/SetChunkData.cpp | 1 | ||||
-rw-r--r-- | src/WorldStorage/WSSAnvil.cpp | 8 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/SetChunkData.cpp b/src/SetChunkData.cpp index bfe59fbcb..707dfb9e8 100644 --- a/src/SetChunkData.cpp +++ b/src/SetChunkData.cpp @@ -44,7 +44,6 @@ cSetChunkData::cSetChunkData( // Check the params' validity: ASSERT(a_BlockTypes != NULL); ASSERT(a_BlockMetas != NULL); - ASSERT(a_Biomes != NULL); // Copy block types and metas: memcpy(m_BlockTypes, a_BlockTypes, sizeof(cChunkDef::BlockTypes)); 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; |