parent
137b021d26
commit
4230eb3d92
@ -44,7 +44,6 @@ cSetChunkData::cSetChunkData(
|
|||||||
// Check the params' validity:
|
// Check the params' validity:
|
||||||
ASSERT(a_BlockTypes != NULL);
|
ASSERT(a_BlockTypes != NULL);
|
||||||
ASSERT(a_BlockMetas != NULL);
|
ASSERT(a_BlockMetas != NULL);
|
||||||
ASSERT(a_Biomes != NULL);
|
|
||||||
|
|
||||||
// Copy block types and metas:
|
// Copy block types and metas:
|
||||||
memcpy(m_BlockTypes, a_BlockTypes, sizeof(cChunkDef::BlockTypes));
|
memcpy(m_BlockTypes, a_BlockTypes, sizeof(cChunkDef::BlockTypes));
|
||||||
|
@ -323,7 +323,13 @@ bool cWSSAnvil::LoadChunkFromNBT(const cChunkCoords & a_Chunk, const cParsedNBT
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
int Sections = a_NBT.FindChildByName(Level, "Sections");
|
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);
|
LOAD_FAILED(a_Chunk.m_ChunkX, a_Chunk.m_ChunkZ);
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user