fix: 32 bit protocol

This commit is contained in:
2021-09-01 16:25:38 +02:00
parent 056534028d
commit 26f060b334
5 changed files with 10 additions and 10 deletions

View File

@@ -49,12 +49,12 @@ DataBuffer Compress(const DataBuffer& buffer) {
return packet;
}
DataBuffer Decompress(DataBuffer& buffer, std::size_t packetLength){
DataBuffer Decompress(DataBuffer& buffer, std::uint64_t packetLength){
std::uint64_t uncompressedLength;
buffer >> uncompressedLength;
std::size_t compressedLength = packetLength - sizeof(uncompressedLength);
std::uint64_t compressedLength = packetLength - sizeof(uncompressedLength);
if (uncompressedLength == 0) {
// Uncompressed

View File

@@ -9,7 +9,7 @@ void initRandomizer(){
srand(time(0));
}
std::uint64_t getRandomNumber(std::size_t max){
std::uint64_t getRandomNumber(std::uint64_t max){
return rand() % max;
}