Fixed bug in decompress algo
This commit is contained in:
parent
e654c00ad0
commit
28531523c4
@ -105,6 +105,7 @@ bool CompressionHandler::decompress(protocol::BasicPacket* packet, std::string &
|
|||||||
|
|
||||||
size_t compressed_size{expected_length};
|
size_t compressed_size{expected_length};
|
||||||
if(!compression::qlz_decompress_payload(packet->data().data_ptr(), &buffer[header_length], &compressed_size)) return false;
|
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));
|
packet->buffer(buffer.range(0, compressed_size + header_length));
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user