From: sfan5 Date: Sun, 4 Aug 2019 18:40:35 +0000 (+0200) Subject: Fix binary-string confusion in client network code X-Git-Tag: 5.1.0~135 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=800fa2d8e74c62103ed3d915fe81195f6551dc80;p=oweals%2Fminetest.git Fix binary-string confusion in client network code --- 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); }