Merge pull request #50412 from timothyqiu/fastlz-decompress

This commit is contained in:
Rémi Verschelde 2021-07-13 12:12:46 +02:00 committed by GitHub
commit dd27413907
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -134,8 +134,9 @@ int Compression::decompress(uint8_t *p_dst, int p_dst_max_size, const uint8_t *p
if (p_dst_max_size < 16) { if (p_dst_max_size < 16) {
uint8_t dst[16]; uint8_t dst[16];
ret_size = fastlz_decompress(p_src, p_src_size, dst, 16); fastlz_decompress(p_src, p_src_size, dst, 16);
memcpy(p_dst, dst, p_dst_max_size); memcpy(p_dst, dst, p_dst_max_size);
ret_size = p_dst_max_size;
} else { } else {
ret_size = fastlz_decompress(p_src, p_src_size, p_dst, p_dst_max_size); ret_size = fastlz_decompress(p_src, p_src_size, p_dst, p_dst_max_size);
} }