forked from Mirrorlandia_minetest/minetest
Remove null bytes from TOCLIENT_BLOCKDATA (#10433)
This commit is contained in:
parent
c6e3050357
commit
09af0c5946
@ -2338,7 +2338,7 @@ void Server::SendBlockNoLock(session_t peer_id, MapBlock *block, u8 ver,
|
|||||||
block->serializeNetworkSpecific(os);
|
block->serializeNetworkSpecific(os);
|
||||||
std::string s = os.str();
|
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 << block->getPos();
|
||||||
pkt.putRawString(s.c_str(), s.size());
|
pkt.putRawString(s.c_str(), s.size());
|
||||||
|
Loading…
Reference in New Issue
Block a user