mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-14 09:05:19 +02:00
Fix binary-string confusion in client network code
This commit is contained in:
@@ -900,7 +900,7 @@ void Client::handleCommand_DetachedInventory(NetworkPacket* pkt)
|
|||||||
u16 ignore;
|
u16 ignore;
|
||||||
*pkt >> ignore; // this used to be the length of the following string, ignore it
|
*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);
|
std::istringstream is(contents, std::ios::binary);
|
||||||
inv->deSerialize(is);
|
inv->deSerialize(is);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user