summaryrefslogtreecommitdiffstats
path: root/src/Blocks
diff options
context:
space:
mode:
authorMoritz Borcherding <moritz.borcherding@web.de>2016-09-18 21:43:30 +0200
committerMattes D <github@xoft.cz>2016-09-27 14:32:20 +0200
commitb268db4caae1b5612ae0f3adabf164efc06de368 (patch)
treea85e615101f7b61f0ebd8c2f73c5068c7b112f88 /src/Blocks
parentAPIDump: Fixed description for tolua functions. (diff)
downloadcuberite-b268db4caae1b5612ae0f3adabf164efc06de368.tar
cuberite-b268db4caae1b5612ae0f3adabf164efc06de368.tar.gz
cuberite-b268db4caae1b5612ae0f3adabf164efc06de368.tar.bz2
cuberite-b268db4caae1b5612ae0f3adabf164efc06de368.tar.lz
cuberite-b268db4caae1b5612ae0f3adabf164efc06de368.tar.xz
cuberite-b268db4caae1b5612ae0f3adabf164efc06de368.tar.zst
cuberite-b268db4caae1b5612ae0f3adabf164efc06de368.zip
Diffstat (limited to '')
-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++)
{