fix: 32 bit protocol
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user