summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockLeaves.h
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-09-02 20:03:42 +0200
committerHowaner <franzi.moos@googlemail.com>2014-09-02 20:03:42 +0200
commitd3b8100a7b84a465ca52238d459bb10d32940c46 (patch)
tree2c272ec985b9228ef2e4892aeeabefa54786d215 /src/Blocks/BlockLeaves.h
parentRemoved SexyMotd link (diff)
parentRe-added alternate spellings of darkgraywool. (diff)
downloadcuberite-d3b8100a7b84a465ca52238d459bb10d32940c46.tar
cuberite-d3b8100a7b84a465ca52238d459bb10d32940c46.tar.gz
cuberite-d3b8100a7b84a465ca52238d459bb10d32940c46.tar.bz2
cuberite-d3b8100a7b84a465ca52238d459bb10d32940c46.tar.lz
cuberite-d3b8100a7b84a465ca52238d459bb10d32940c46.tar.xz
cuberite-d3b8100a7b84a465ca52238d459bb10d32940c46.tar.zst
cuberite-d3b8100a7b84a465ca52238d459bb10d32940c46.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 972dd6232..a8aa28a0f 100644
--- a/src/Blocks/BlockLeaves.h
+++ b/src/Blocks/BlockLeaves.h
@@ -152,7 +152,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 = a_BlockY - i; y <= a_BlockY + i; y++)
+ for (int y = std::max(a_BlockY - i, 0); y <= std::min(a_BlockY + i, 255); y++)
{
for (int z = a_BlockZ - i; z <= a_BlockZ + i; z++)
{