Skip to content
Permalink
Browse files

Remove null bytes from TOCLIENT_BLOCKDATA (#10433)

  • Loading branch information
luk3yx committed Sep 26, 2020
1 parent c6e3050 commit 09af0c5946c7082fc82563faf0ad9ef144fb9a06
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/server.cpp
@@ -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());

0 comments on commit 09af0c5

Please sign in to comment.
You can’t perform that action at this time.