From cbff1378fd78b6eaa59bad21759c8b89f1dab341 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Sun, 5 Feb 2017 16:00:38 +0100 Subject: Fixed bindings for cBlockArea:Read and Write. (#3568) The original bindings accepted nil as the World param, causing a crash. --- src/Blocks/BlockFarmland.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Blocks/BlockFarmland.h') diff --git a/src/Blocks/BlockFarmland.h b/src/Blocks/BlockFarmland.h index 412eb1d2c..ddbd79335 100644 --- a/src/Blocks/BlockFarmland.h +++ b/src/Blocks/BlockFarmland.h @@ -109,7 +109,7 @@ public: cBlockArea Area; int BlockX = a_RelX + a_Chunk.GetPosX() * cChunkDef::Width; int BlockZ = a_RelZ + a_Chunk.GetPosZ() * cChunkDef::Width; - if (!Area.Read(a_Chunk.GetWorld(), BlockX - 4, BlockX + 4, a_RelY, a_RelY + 1, BlockZ - 4, BlockZ + 4)) + if (!Area.Read(*a_Chunk.GetWorld(), BlockX - 4, BlockX + 4, a_RelY, a_RelY + 1, BlockZ - 4, BlockZ + 4)) { // Too close to the world edge, cannot check surroundings return false; -- cgit v1.2.3