From 5c21831f0efe448bed7cafd39f4ed036bd9890a8 Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 21 Jan 2023 10:36:27 +0800 Subject: fix lz4 --- core/src/xmake/lz4/block_decompress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v1.3.1