diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Items/ItemHandler.cpp | 2 | ||||
-rw-r--r-- | src/Protocol/Protocol18x.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/Items/ItemHandler.cpp b/src/Items/ItemHandler.cpp index f38e2a3e3..d61c883b2 100644 --- a/src/Items/ItemHandler.cpp +++ b/src/Items/ItemHandler.cpp @@ -287,7 +287,7 @@ cItemHandler * cItemHandler::CreateItemHandler(int a_ItemType) void cItemHandler::Deinit() { - for (int i = 0; i < 2267; i++) + for (int i = 0; i < ARRAYCOUNT(m_ItemHandler); i++) { delete m_ItemHandler[i]; m_ItemHandler[i] = nullptr; 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; } |