summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemLighter.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Items/ItemLighter.h')
-rw-r--r--src/Items/ItemLighter.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Items/ItemLighter.h b/src/Items/ItemLighter.h
index 4281a2d0c..8f3389d95 100644
--- a/src/Items/ItemLighter.h
+++ b/src/Items/ItemLighter.h
@@ -42,6 +42,10 @@ public:
{
// Light a fire next to/on top of the block if air:
AddFaceDirection(a_BlockX, a_BlockY, a_BlockZ, a_BlockFace);
+ if ((a_BlockY < 0) || (a_BlockY >= cChunkDef::Height))
+ {
+ break;
+ }
if (a_World->GetBlock(a_BlockX, a_BlockY, a_BlockZ) == E_BLOCK_AIR)
{
a_World->SetBlock(a_BlockX, a_BlockY, a_BlockZ, E_BLOCK_FIRE, 0);