Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove null bytes from TOCLIENT_BLOCKDATA (#10433)
  • Loading branch information
luk3yx committed Sep 26, 2020
1 parent c6e3050 commit 09af0c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server.cpp
Expand Up @@ -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());
Expand Down

0 comments on commit 09af0c5

Please sign in to comment.