summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2023-01-21 10:36:27 +0800
committerruki <[email protected]>2023-01-21 10:36:27 +0800
commit5c21831f0efe448bed7cafd39f4ed036bd9890a8 (patch)
tree4889051845b7118e9ffbc1828f56bff3c3356eeb
parent4aeed729c422af3f5f31c2a52f10bca76411f279 (diff)
fix lz4
-rw-r--r--core/src/xmake/lz4/block_decompress.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/xmake/lz4/block_decompress.c b/core/src/xmake/lz4/block_decompress.c
index d4c656280..ed5f35a06 100644
--- a/core/src/xmake/lz4/block_decompress.c
+++ b/core/src/xmake/lz4/block_decompress.c
@@ -65,7 +65,7 @@ tb_int_t xm_lz4_block_decompress(lua_State* lua)
tb_byte_t buffer[8192];
do
{
- output_data = real <= sizeof(buffer)? buffer : (tb_byte_t*)tb_malloc(buffer_maxn);
+ output_data = real <= sizeof(buffer)? buffer : (tb_byte_t*)tb_malloc(real);
tb_assert_and_check_break(output_data);
tb_int_t r = LZ4_decompress_safe((tb_char_t const*)data, (tb_char_t*)output_data, real, real);