summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-12-20 14:56:42 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-12-20 14:56:42 +0100
commitaf66f8ebae0add1b49878392d1d767590598ebf2 (patch)
treef1d46fb6f9b0eba4b80a726709e11e53cbbf7e65
parentFixed a bool evaluation warning in BlockDoor.h (diff)
downloadcuberite-af66f8ebae0add1b49878392d1d767590598ebf2.tar
cuberite-af66f8ebae0add1b49878392d1d767590598ebf2.tar.gz
cuberite-af66f8ebae0add1b49878392d1d767590598ebf2.tar.bz2
cuberite-af66f8ebae0add1b49878392d1d767590598ebf2.tar.lz
cuberite-af66f8ebae0add1b49878392d1d767590598ebf2.tar.xz
cuberite-af66f8ebae0add1b49878392d1d767590598ebf2.tar.zst
cuberite-af66f8ebae0add1b49878392d1d767590598ebf2.zip
-rw-r--r--source/Simulator/RedstoneSimulator.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/Simulator/RedstoneSimulator.cpp b/source/Simulator/RedstoneSimulator.cpp
index afc5cca3d..2224d300d 100644
--- a/source/Simulator/RedstoneSimulator.cpp
+++ b/source/Simulator/RedstoneSimulator.cpp
@@ -456,6 +456,10 @@ int cRedstoneSimulator::UnPowerBlock( const Vector3i & a_BlockPos, const Vector3
{
BLOCKTYPE BlockType;
NIBBLETYPE BlockMeta;
+ if ((a_BlockPos.y < 0) || (a_BlockPos.y >= cChunkDef::Height))
+ {
+ return 0;
+ }
m_World->GetBlockTypeMeta(a_BlockPos.x, a_BlockPos.y, a_BlockPos.z, BlockType, BlockMeta);
switch (BlockType)
{