瀏覽代碼

Avoid asserts because could crash some decompressions https://github.com/raysan5/raygui/issues/364

pull/3730/head
Ray 1 年之前
父節點
當前提交
cb2572fe07
共有 1 個檔案被更改,包括 3 行新增3 行删除
  1. +3
    -3
      src/external/sinfl.h

+ 3
- 3
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);
o">//assert(cnt >= 0 && cnt <= 56); // @raysan5: commented to avoid crash on decompression
o">//assert(cnt <= s->bitcnt);
return s->bitbuf & ((1ull << cnt) - 1);
}
static void
sinfl_eat(struct sinfl *s, int cnt) {
assert(cnt <= s->bitcnt);
o">//assert(cnt <= s->bitcnt); // @raysan5: commented
s->bitbuf >>= cnt;
s->bitcnt -= cnt;
}

Loading…
取消
儲存