Fixed bug in decompress algo

This commit is contained in:
WolverinDEV 2020-02-02 20:44:35 +01:00
parent e654c00ad0
commit 28531523c4
1 changed files with 1 additions and 0 deletions

View File

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