summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-09-05 15:40:03 +0200
committerMattes D <github@xoft.cz>2014-09-05 15:40:03 +0200
commit254c8c9154e8355f139e43cf482366bb4855a4f8 (patch)
tree2009005a9bc162980853a0143f2dbe708e6ae769
parentMerge pull request #1375 from mc-server/EntitiesInBox (diff)
downloadcuberite-254c8c9154e8355f139e43cf482366bb4855a4f8.tar
cuberite-254c8c9154e8355f139e43cf482366bb4855a4f8.tar.gz
cuberite-254c8c9154e8355f139e43cf482366bb4855a4f8.tar.bz2
cuberite-254c8c9154e8355f139e43cf482366bb4855a4f8.tar.lz
cuberite-254c8c9154e8355f139e43cf482366bb4855a4f8.tar.xz
cuberite-254c8c9154e8355f139e43cf482366bb4855a4f8.tar.zst
cuberite-254c8c9154e8355f139e43cf482366bb4855a4f8.zip
-rw-r--r--src/WorldStorage/WSSAnvil.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/WorldStorage/WSSAnvil.cpp b/src/WorldStorage/WSSAnvil.cpp
index 4d2f92173..b8f8ba019 100644
--- a/src/WorldStorage/WSSAnvil.cpp
+++ b/src/WorldStorage/WSSAnvil.cpp
@@ -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;