Remove null bytes from TOCLIENT_BLOCKDATA (#10433)

This commit is contained in:
luk3yx 2020-09-27 01:31:54 +12:00 committed by GitHub
parent c6e3050357
commit 09af0c5946
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -2338,7 +2338,7 @@ void Server::SendBlockNoLock(session_t peer_id, MapBlock *block, u8 ver,
block->serializeNetworkSpecific(os);
std::string s = os.str();
NetworkPacket pkt(TOCLIENT_BLOCKDATA, 2 + 2 + 2 + 2 + s.size(), peer_id);
NetworkPacket pkt(TOCLIENT_BLOCKDATA, 2 + 2 + 2 + s.size(), peer_id);
pkt << block->getPos();
pkt.putRawString(s.c_str(), s.size());