From cb2572fe07ea49b951198a0adc189a8e903244ca Mon Sep 17 00:00:00 2001 From: Ray Date: Sat, 13 Jan 2024 16:57:25 +0100 Subject: [PATCH] Avoid asserts because could crash some decompressions https://github.com/raysan5/raygui/issues/364 --- src/external/sinfl.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/external/sinfl.h b/src/external/sinfl.h index 16589c173..1f6bf6f02 100644 --- a/src/external/sinfl.h +++ b/src/external/sinfl.h @@ -231,13 +231,13 @@ sinfl_refill(struct sinfl *s) { } static int sinfl_peek(struct sinfl *s, int cnt) { - assert(cnt >= 0 && cnt <= 56); - assert(cnt <= s->bitcnt); + //assert(cnt >= 0 && cnt <= 56); // @raysan5: commented to avoid crash on decompression + //assert(cnt <= s->bitcnt); return s->bitbuf & ((1ull << cnt) - 1); } static void sinfl_eat(struct sinfl *s, int cnt) { - assert(cnt <= s->bitcnt); + //assert(cnt <= s->bitcnt); // @raysan5: commented s->bitbuf >>= cnt; s->bitcnt -= cnt; }