diff options
author | rubenwardy <rw@rubenwardy.com> | 2019-03-07 06:41:21 +0000 |
---|---|---|
committer | Loïc Blot <nerzhul@users.noreply.github.com> | 2019-03-07 07:41:21 +0100 |
commit | ac86d047849f61999c52a20b3116ee4f8895d28d (patch) | |
tree | 6a647ab6743c752ff5f9868a24f3f1b1c86e6fb7 /src/network/clientpackethandler.cpp | |
parent | 82c63635594b0f33a9378566ea3a5185c196ae84 (diff) | |
download | minetest-ac86d047849f61999c52a20b3116ee4f8895d28d.tar.gz minetest-ac86d047849f61999c52a20b3116ee4f8895d28d.tar.bz2 minetest-ac86d047849f61999c52a20b3116ee4f8895d28d.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); } |