Avoid asserts because could crash some decompressions https://github.com/raysan5/raygui/issues/364
This commit is contained in:
parent
520c8cffb2
commit
cb2572fe07
1 changed files with 3 additions and 3 deletions
6
src/external/sinfl.h
vendored
6
src/external/sinfl.h
vendored
|
@ -231,13 +231,13 @@ sinfl_refill(struct sinfl *s) {
|
||||||
}
|
}
|
||||||
static int
|
static int
|
||||||
sinfl_peek(struct sinfl *s, int cnt) {
|
sinfl_peek(struct sinfl *s, int cnt) {
|
||||||
assert(cnt >= 0 && cnt <= 56);
|
//assert(cnt >= 0 && cnt <= 56); // @raysan5: commented to avoid crash on decompression
|
||||||
assert(cnt <= s->bitcnt);
|
//assert(cnt <= s->bitcnt);
|
||||||
return s->bitbuf & ((1ull << cnt) - 1);
|
return s->bitbuf & ((1ull << cnt) - 1);
|
||||||
}
|
}
|
||||||
static void
|
static void
|
||||||
sinfl_eat(struct sinfl *s, int cnt) {
|
sinfl_eat(struct sinfl *s, int cnt) {
|
||||||
assert(cnt <= s->bitcnt);
|
//assert(cnt <= s->bitcnt); // @raysan5: commented
|
||||||
s->bitbuf >>= cnt;
|
s->bitbuf >>= cnt;
|
||||||
s->bitcnt -= cnt;
|
s->bitcnt -= cnt;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue