From b87e0b6b1519cb26a28aa87b59a20c8e27c6b9bc Mon Sep 17 00:00:00 2001 From: Julian Laubstein Date: Tue, 10 Nov 2015 23:06:29 +0100 Subject: Adjusted height validation using cChunkDef::IsValidHeight() --- src/ChunkMap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ChunkMap.cpp') 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(a_BlockY))) { return; } -- cgit v1.2.3