summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-04-20 08:33:35 +0200
committerMattes D <github@xoft.cz>2015-04-20 08:35:32 +0200
commitc0bd4824482e476904bcf7b75c3f922400cc11c6 (patch)
tree953b29c570ceb033d44f69921862fb81acfdde46
parentItemHandler: Using automatic array bounds. (diff)
downloadcuberite-c0bd4824482e476904bcf7b75c3f922400cc11c6.tar
cuberite-c0bd4824482e476904bcf7b75c3f922400cc11c6.tar.gz
cuberite-c0bd4824482e476904bcf7b75c3f922400cc11c6.tar.bz2
cuberite-c0bd4824482e476904bcf7b75c3f922400cc11c6.tar.lz
cuberite-c0bd4824482e476904bcf7b75c3f922400cc11c6.tar.xz
cuberite-c0bd4824482e476904bcf7b75c3f922400cc11c6.tar.zst
cuberite-c0bd4824482e476904bcf7b75c3f922400cc11c6.zip
-rw-r--r--src/Protocol/Protocol18x.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Protocol/Protocol18x.cpp b/src/Protocol/Protocol18x.cpp
index 62c8a30df..0baae00de 100644
--- a/src/Protocol/Protocol18x.cpp
+++ b/src/Protocol/Protocol18x.cpp
@@ -2675,7 +2675,7 @@ void cProtocol180::ParseItemMetadata(cItem & a_Item, const AString & a_Metadata)
if (!NBT.IsValid())
{
AString HexDump;
- CreateHexDump(HexDump, a_Metadata.data(), a_Metadata.size(), 16);
+ CreateHexDump(HexDump, a_Metadata.data(), std::max<size_t>(a_Metadata.size(), 1024), 16);
LOGWARNING("Cannot parse NBT item metadata: (" SIZE_T_FMT " bytes)\n%s", a_Metadata.size(), HexDump.c_str());
return;
}