summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-09-06 18:59:17 +0200
committerMattes D <github@xoft.cz>2014-09-06 18:59:17 +0200
commit0a651b9fd83f078a73429f02603144e80a05148d (patch)
treecb9b30cc975b884dd2da97271da6570c4eb70537 /src
parentAlpha-sorted protocol 1.7 senders. (diff)
downloadcuberite-0a651b9fd83f078a73429f02603144e80a05148d.tar
cuberite-0a651b9fd83f078a73429f02603144e80a05148d.tar.gz
cuberite-0a651b9fd83f078a73429f02603144e80a05148d.tar.bz2
cuberite-0a651b9fd83f078a73429f02603144e80a05148d.tar.lz
cuberite-0a651b9fd83f078a73429f02603144e80a05148d.tar.xz
cuberite-0a651b9fd83f078a73429f02603144e80a05148d.tar.zst
cuberite-0a651b9fd83f078a73429f02603144e80a05148d.zip
Diffstat (limited to '')
-rw-r--r--src/BlockEntities/SignEntity.cpp1
-rw-r--r--src/Protocol/Protocol17x.cpp1
-rw-r--r--src/WorldStorage/WSSAnvil.cpp2
3 files changed, 4 insertions, 0 deletions
diff --git a/src/BlockEntities/SignEntity.cpp b/src/BlockEntities/SignEntity.cpp
index 97fed0f04..23d9ef926 100644
--- a/src/BlockEntities/SignEntity.cpp
+++ b/src/BlockEntities/SignEntity.cpp
@@ -15,6 +15,7 @@
cSignEntity::cSignEntity(BLOCKTYPE a_BlockType, int a_X, int a_Y, int a_Z, cWorld * a_World) :
super(a_BlockType, a_X, a_Y, a_Z, a_World)
{
+ ASSERT((a_Y >= 0) && (a_Y < cChunkDef::Height));
}
diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp
index 1091b877f..f24ef320d 100644
--- a/src/Protocol/Protocol17x.cpp
+++ b/src/Protocol/Protocol17x.cpp
@@ -1355,6 +1355,7 @@ void cProtocol172::SendUpdateBlockEntity(cBlockEntity & a_BlockEntity)
void cProtocol172::SendUpdateSign(int a_BlockX, int a_BlockY, int a_BlockZ, const AString & a_Line1, const AString & a_Line2, const AString & a_Line3, const AString & a_Line4)
{
ASSERT(m_State == 3); // In game mode?
+ ASSERT((a_BlockY >= 0) && (a_BlockY < cChunkDef::Height));
cPacketizer Pkt(*this, 0x33);
Pkt.WriteInt(a_BlockX);
diff --git a/src/WorldStorage/WSSAnvil.cpp b/src/WorldStorage/WSSAnvil.cpp
index 2500b5dea..fe309ce4e 100644
--- a/src/WorldStorage/WSSAnvil.cpp
+++ b/src/WorldStorage/WSSAnvil.cpp
@@ -623,6 +623,8 @@ void cWSSAnvil::LoadBlockEntitiesFromNBT(cBlockEntityList & a_BlockEntities, con
cBlockEntity * cWSSAnvil::LoadBlockEntityFromNBT(const cParsedNBT & a_NBT, int a_Tag, int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta)
{
+ ASSERT((a_BlockY >= 0) && (a_BlockY < cChunkDef::Height));
+
// Load the specific BlockEntity type:
switch (a_BlockType)
{