Fix binary-string confusion in client network code

master
sfan5 2019-08-04 20:40:35 +02:00
parent d0246cfdcc
commit 800fa2d8e7
1 changed files with 1 additions and 1 deletions

View File

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