diff --git a/src/protocol/CompressionHandler.cpp b/src/protocol/CompressionHandler.cpp index fb765fc..6ed5afd 100644 --- a/src/protocol/CompressionHandler.cpp +++ b/src/protocol/CompressionHandler.cpp @@ -15,7 +15,7 @@ bool CompressionHandler::compress(protocol::BasicPacket* packet, std::string &er auto packet_payload = packet->data(); 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); qlz_state_compress state_compress{};