summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockLeaves.h
diff options
context:
space:
mode:
authorLogicParrot <LogicParrot@users.noreply.github.com>2016-10-09 14:10:41 +0200
committerLogicParrot <LogicParrot@users.noreply.github.com>2016-10-09 14:10:41 +0200
commitf951a2528325af8e1a9ef17f9a765ad68825aec7 (patch)
treec0fad320c151dec86590c3746dcbaaf5657df11c /src/Blocks/BlockLeaves.h
parentUpdate apidoc (diff)
parentUpdated the Core plugin. (diff)
downloadcuberite-f951a2528325af8e1a9ef17f9a765ad68825aec7.tar
cuberite-f951a2528325af8e1a9ef17f9a765ad68825aec7.tar.gz
cuberite-f951a2528325af8e1a9ef17f9a765ad68825aec7.tar.bz2
cuberite-f951a2528325af8e1a9ef17f9a765ad68825aec7.tar.lz
cuberite-f951a2528325af8e1a9ef17f9a765ad68825aec7.tar.xz
cuberite-f951a2528325af8e1a9ef17f9a765ad68825aec7.tar.zst
cuberite-f951a2528325af8e1a9ef17f9a765ad68825aec7.zip
Diffstat (limited to 'src/Blocks/BlockLeaves.h')
-rw-r--r--src/Blocks/BlockLeaves.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Blocks/BlockLeaves.h b/src/Blocks/BlockLeaves.h
index 84e186b4c..6c2905171 100644
--- a/src/Blocks/BlockLeaves.h
+++ b/src/Blocks/BlockLeaves.h
@@ -166,7 +166,7 @@ bool HasNearLog(cBlockArea & a_Area, int a_BlockX, int a_BlockY, int a_BlockZ)
a_Area.SetBlockType(a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_SPONGE);
for (int i = 0; i < LEAVES_CHECK_DISTANCE; i++)
{
- for (int y = std::max(a_BlockY - i, 0); y <= std::min(a_BlockY + i, 255); y++)
+ for (int y = std::max(a_BlockY - i, 0); y <= std::min(a_BlockY + i, cChunkDef::Height - 1); y++)
{
for (int z = a_BlockZ - i; z <= a_BlockZ + i; z++)
{