From ac86d047849f61999c52a20b3116ee4f8895d28d Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Thu, 7 Mar 2019 06:41:21 +0000 Subject: Fix detach inventory serialisation (#8331) --- src/network/clientpackethandler.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/network/clientpackethandler.cpp') diff --git a/src/network/clientpackethandler.cpp b/src/network/clientpackethandler.cpp index 3e50173a6..889002a82 100644 --- a/src/network/clientpackethandler.cpp +++ b/src/network/clientpackethandler.cpp @@ -895,8 +895,10 @@ void Client::handleCommand_DetachedInventory(NetworkPacket* pkt) inv = inv_it->second; } - std::string contents; - *pkt >> contents; + u16 ignore; + *pkt >> ignore; // this used to be the length of the following string, ignore it + + std::string contents = pkt->getRemainingString(); std::istringstream is(contents, std::ios::binary); inv->deSerialize(is); } -- cgit v1.2.3