1
0
mirror of https://github.com/minetest/minetest.git synced 2025-07-01 15:40:23 +02:00

Fix detach inventory serialisation (#8331)

This commit is contained in:
rubenwardy
2019-03-07 06:41:21 +00:00
committed by Loïc Blot
parent 82c6363559
commit ac86d04784
2 changed files with 8 additions and 3 deletions

View File

@ -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);
}