fix binary data breaking in UDPRcvFromClient

This commit is contained in:
Lion Kortlepel 2022-10-15 23:30:09 +02:00
parent 331a597ec7
commit 92632b53b5
No known key found for this signature in database
GPG Key ID: 4322FF2B4C71259B

View File

@ -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);
}