summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-03-02 17:28:51 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-03-09 13:48:59 +0100
commita2fb28dd082b85d714970f119a82cdba3583037a (patch)
tree7e680cbc89d22dc6d824370282bc4c8b26816ddd /src
parentDemonstrated issues with GetDataLength() (diff)
downloadcuberite-a2fb28dd082b85d714970f119a82cdba3583037a.tar
cuberite-a2fb28dd082b85d714970f119a82cdba3583037a.tar.gz
cuberite-a2fb28dd082b85d714970f119a82cdba3583037a.tar.bz2
cuberite-a2fb28dd082b85d714970f119a82cdba3583037a.tar.lz
cuberite-a2fb28dd082b85d714970f119a82cdba3583037a.tar.xz
cuberite-a2fb28dd082b85d714970f119a82cdba3583037a.tar.zst
cuberite-a2fb28dd082b85d714970f119a82cdba3583037a.zip
Diffstat (limited to 'src')
-rw-r--r--src/ClientHandle.cpp2
-rw-r--r--src/WorldStorage/FireworksSerializer.cpp5
2 files changed, 4 insertions, 3 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp
index ef33a313d..9f08b43a5 100644
--- a/src/ClientHandle.cpp
+++ b/src/ClientHandle.cpp
@@ -939,7 +939,7 @@ void cClientHandle::HandleRightClick(int a_BlockX, int a_BlockY, int a_BlockZ, e
if (!CheckBlockInteractionsRate())
{
- Kick("Too many blocks were destroyed per unit time - hacked client?");
+ Kick("Too many blocks were placed/interacted with per unit time - hacked client?");
return;
}
diff --git a/src/WorldStorage/FireworksSerializer.cpp b/src/WorldStorage/FireworksSerializer.cpp
index 34204ae8a..464bf225d 100644
--- a/src/WorldStorage/FireworksSerializer.cpp
+++ b/src/WorldStorage/FireworksSerializer.cpp
@@ -89,7 +89,8 @@ void cFireworkItem::ParseFromNBT(cFireworkItem & a_FireworkItem, const cParsedNB
if (ExplosionName == "Colors")
{
- int DataLength = a_NBT.GetDataLength(explosiontag);
+ // Divide by four as data length returned in bytes
+ int DataLength = a_NBT.GetDataLength(explosiontag) / 4;
if (DataLength == 0)
{
continue;
@@ -103,7 +104,7 @@ void cFireworkItem::ParseFromNBT(cFireworkItem & a_FireworkItem, const cParsedNB
}
else if (ExplosionName == "FadeColors")
{
- int DataLength = a_NBT.GetDataLength(explosiontag);
+ int DataLength = a_NBT.GetDataLength(explosiontag) / 4;
if (DataLength == 0)
{
continue;