Fixed the decompress helper

This commit is contained in:
WolverinDEV 2020-02-02 20:11:11 +01:00
parent 8f7d980a6a
commit e654c00ad0

View File

@ -104,7 +104,7 @@ bool CompressionHandler::decompress(protocol::BasicPacket* packet, std::string &
auto buffer = buffer::allocate_buffer(expected_length + header_length); auto buffer = buffer::allocate_buffer(expected_length + header_length);
size_t compressed_size{expected_length}; size_t compressed_size{expected_length};
if(!compression::qlz_compress_payload(packet->data().data_ptr(), packet->data().length(), &buffer[header_length], &compressed_size)) return false; if(!compression::qlz_decompress_payload(packet->data().data_ptr(), &buffer[header_length], &compressed_size)) return false;
packet->buffer(buffer.range(0, compressed_size + header_length)); packet->buffer(buffer.range(0, compressed_size + header_length));
return true; return true;