mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-02 07:45:26 +00:00
fix binary data breaking in UDPRcvFromClient
This commit is contained in:
parent
331a597ec7
commit
92632b53b5
@ -927,6 +927,6 @@ std::vector<uint8_t> TNetwork::UDPRcvFromClient(ip::udp::endpoint& ClientEndpoin
|
||||
beammp_errorf("UDP recvfrom() failed: {}", ec.message());
|
||||
return {};
|
||||
}
|
||||
// FIXME: This breaks binary data due to \0.
|
||||
return std::vector<uint8_t>(Ret.begin(), Ret.end());
|
||||
beammp_assert(Rcv <= Ret.size());
|
||||
return std::vector<uint8_t>(Ret.begin(), Ret.begin() + Rcv);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user