diff options
author | rubenwardy <rw@rubenwardy.com> | 2019-03-07 06:41:21 +0000 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2019-03-11 22:07:19 +0000 |
commit | da4739a26cb8327d1e6c5d8642692e5fbb0ad4a0 (patch) | |
tree | a0f40c9994043bd23330b9dc47bac90213152b08 /src/network/clientpackethandler.cpp | |
parent | fc24bf09153f17bec023cde164a039202102a66c (diff) | |
download | minetest-da4739a26cb8327d1e6c5d8642692e5fbb0ad4a0.tar.gz minetest-da4739a26cb8327d1e6c5d8642692e5fbb0ad4a0.tar.bz2 minetest-da4739a26cb8327d1e6c5d8642692e5fbb0ad4a0.zip |
Fix detach inventory serialisation (#8331)
Diffstat (limited to 'src/network/clientpackethandler.cpp')
-rw-r--r-- | src/network/clientpackethandler.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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); } |