From 800fa2d8e74c62103ed3d915fe81195f6551dc80 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Sun, 4 Aug 2019 20:40:35 +0200 Subject: [PATCH] Fix binary-string confusion in client network code --- src/network/clientpackethandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network/clientpackethandler.cpp b/src/network/clientpackethandler.cpp index 2f5deae2a..1ae47d190 100644 --- a/src/network/clientpackethandler.cpp +++ b/src/network/clientpackethandler.cpp @@ -900,7 +900,7 @@ void Client::handleCommand_DetachedInventory(NetworkPacket* pkt) u16 ignore; *pkt >> ignore; // this used to be the length of the following string, ignore it - std::string contents = pkt->getRemainingString(); + std::string contents(pkt->getRemainingString(), pkt->getRemainingBytes()); std::istringstream is(contents, std::ios::binary); inv->deSerialize(is); }