1
0

Anvil: Fixed loading block entities with invalid Y coord.

This commit is contained in:
Mattes D 2014-09-05 16:40:03 +03:00
parent e9dda864ea
commit 254c8c9154

View File

@ -589,7 +589,7 @@ void cWSSAnvil::LoadBlockEntitiesFromNBT(cBlockEntityList & a_BlockEntities, con
// Get the BlockEntity's position
int x, y, z;
if (!GetBlockEntityNBTPos(a_NBT, Child, x, y, z))
if (!GetBlockEntityNBTPos(a_NBT, Child, x, y, z) || (y < 0) || (y >= cChunkDef::Height))
{
LOGWARNING("Bad block entity, missing the coords. Will be ignored.");
continue;