summaryrefslogtreecommitdiffstats
path: root/src/ChunkMap.cpp
diff options
context:
space:
mode:
authorNiLSPACE <NiLSPACE@users.noreply.github.com>2015-11-23 11:55:34 +0100
committerNiLSPACE <NiLSPACE@users.noreply.github.com>2015-11-23 11:55:34 +0100
commit002019e9ad545335c28e7309b087baa64993723d (patch)
tree543ddb9986d9062f964b8f8d0d1d6dd21bdbfcab /src/ChunkMap.cpp
parentMerge pull request #2678 from cuberite/ln (diff)
parentAdjusted height validation using cChunkDef::IsValidHeight() (diff)
downloadcuberite-002019e9ad545335c28e7309b087baa64993723d.tar
cuberite-002019e9ad545335c28e7309b087baa64993723d.tar.gz
cuberite-002019e9ad545335c28e7309b087baa64993723d.tar.bz2
cuberite-002019e9ad545335c28e7309b087baa64993723d.tar.lz
cuberite-002019e9ad545335c28e7309b087baa64993723d.tar.xz
cuberite-002019e9ad545335c28e7309b087baa64993723d.tar.zst
cuberite-002019e9ad545335c28e7309b087baa64993723d.zip
Diffstat (limited to 'src/ChunkMap.cpp')
-rw-r--r--src/ChunkMap.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ChunkMap.cpp b/src/ChunkMap.cpp
index d95ffd6ef..0d1127997 100644
--- a/src/ChunkMap.cpp
+++ b/src/ChunkMap.cpp
@@ -1859,7 +1859,7 @@ bool cChunkMap::ForEachEntityInBox(const cBoundingBox & a_Box, cEntityCallback &
void cChunkMap::DoExplosionAt(double a_ExplosionSize, double a_BlockX, double a_BlockY, double a_BlockZ, cVector3iArray & a_BlocksAffected)
{
// Don't explode if outside of Y range (prevents the following test running into unallocated memory):
- if ((a_BlockY < 0) || (a_BlockY > cChunkDef::Height - 1))
+ if (!cChunkDef::IsValidHeight(static_cast<int>(a_BlockY)))
{
return;
}