Fixed invalid type
This commit is contained in:
parent
ebb382cc40
commit
47a8b537ca
@ -15,7 +15,7 @@ bool CompressionHandler::compress(protocol::BasicPacket* packet, std::string &er
|
|||||||
auto packet_payload = packet->data();
|
auto packet_payload = packet->data();
|
||||||
auto header_length = packet->length() - packet_payload.length();
|
auto header_length = packet->length() - packet_payload.length();
|
||||||
|
|
||||||
size_t max_compressed_payload_size = max(min(packet_payload.length() * 2, packet_payload.length() + 400ULL), 24ULL); /* at least 12 bytes (QLZ header) */
|
size_t max_compressed_payload_size = max(min(packet_payload.length() * 2, (size_t) (packet_payload.length() + 400ULL)), (size_t) 24ULL); /* at least 12 bytes (QLZ header) */
|
||||||
auto target_buffer = buffer::allocate_buffer(max_compressed_payload_size + header_length);
|
auto target_buffer = buffer::allocate_buffer(max_compressed_payload_size + header_length);
|
||||||
|
|
||||||
qlz_state_compress state_compress{};
|
qlz_state_compress state_compress{};
|
||||||
|
Loading…
Reference in New Issue
Block a user