From bc7d49d8c3a57f322d032684918ba79b961031e7 Mon Sep 17 00:00:00 2001 From: guillempages Date: Thu, 18 Apr 2024 22:57:04 +0200 Subject: [PATCH] Allow compilation on ESP-IDF framework When trying to use the library on the ESP IDF framework, an error is thrown because of the formatting of some successive for loops. Moving those into separate lines solves the issue and allows ESP IDF to compile. --- src/miniz.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/miniz.c b/src/miniz.c index 6c28424..1669ec6 100644 --- a/src/miniz.c +++ b/src/miniz.c @@ -1509,7 +1509,10 @@ tinfl_status tinfl_decompress(tinfl_decompressor *r, const mz_uint8 *pIn_buf_nex { mz_uint8 *p = r->m_tables[0].m_code_size; mz_uint i; r->m_table_sizes[0] = 288; r->m_table_sizes[1] = 32; TINFL_MEMSET(r->m_tables[1].m_code_size, 5, 32); - for ( i = 0; i <= 143; ++i) *p++ = 8; for ( ; i <= 255; ++i) *p++ = 9; for ( ; i <= 279; ++i) *p++ = 7; for ( ; i <= 287; ++i) *p++ = 8; + for ( i = 0; i <= 143; ++i) *p++ = 8; + for ( ; i <= 255; ++i) *p++ = 9; + for ( ; i <= 279; ++i) *p++ = 7; + for ( ; i <= 287; ++i) *p++ = 8; } else {