diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-03-02 17:28:51 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-03-09 13:48:59 +0100 |
commit | a2fb28dd082b85d714970f119a82cdba3583037a (patch) | |
tree | 7e680cbc89d22dc6d824370282bc4c8b26816ddd | |
parent | Demonstrated issues with GetDataLength() (diff) | |
download | cuberite-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 '')
-rw-r--r-- | src/ClientHandle.cpp | 2 | ||||
-rw-r--r-- | src/WorldStorage/FireworksSerializer.cpp | 5 |
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; |