summaryrefslogtreecommitdiffstats
path: root/source/ClientHandle.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-08-24 21:25:36 +0200
committermadmaxoft <github@xoft.cz>2013-08-24 21:25:36 +0200
commit259f08aac88c5e5ac49e5ec06f13c8b4759766c3 (patch)
tree0440a203701aff321bddac5f43c60be07316c6d5 /source/ClientHandle.cpp
parentAdded Unicode, Inc.'s notice. (diff)
downloadcuberite-259f08aac88c5e5ac49e5ec06f13c8b4759766c3.tar
cuberite-259f08aac88c5e5ac49e5ec06f13c8b4759766c3.tar.gz
cuberite-259f08aac88c5e5ac49e5ec06f13c8b4759766c3.tar.bz2
cuberite-259f08aac88c5e5ac49e5ec06f13c8b4759766c3.tar.lz
cuberite-259f08aac88c5e5ac49e5ec06f13c8b4759766c3.tar.xz
cuberite-259f08aac88c5e5ac49e5ec06f13c8b4759766c3.tar.zst
cuberite-259f08aac88c5e5ac49e5ec06f13c8b4759766c3.zip
Diffstat (limited to 'source/ClientHandle.cpp')
-rw-r--r--source/ClientHandle.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/ClientHandle.cpp b/source/ClientHandle.cpp
index ed76ee086..8125fc127 100644
--- a/source/ClientHandle.cpp
+++ b/source/ClientHandle.cpp
@@ -871,7 +871,12 @@ void cClientHandle::HandlePlaceBlock(int a_BlockX, int a_BlockY, int a_BlockZ, c
return;
}
-
+ if ((a_BlockY < 0) || (a_BlockY >= cChunkDef::Height))
+ {
+ // The block is being placed outside the world, ignore this packet altogether (#128)
+ return;
+ }
+
BLOCKTYPE PlaceBlock = World->GetBlock(a_BlockX, a_BlockY, a_BlockZ);
if (!BlockHandler(PlaceBlock)->DoesIgnoreBuildCollision())
{