Skip to content
Myr

Added debugging check on line 1604

Before adoption: this commit came in with the history the project adopted, so no landing records it.

I added the code assert(f->valid_bits >= n); instead of removing if (f->valid_bits < 0) return 0; to improve code with checking and debugging instead.

authored by wph612 · committed by GitHub · parent fcd0a0b · Browse files · 1 file+2 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−0 removed

  • other:+2 added−0 removed

1 file+2 added−0 removed

modified:stb_vorbis.c+2 added
1599 unmodified lines
1600 f->valid_bits += 8;1601 }1602 }16031604 assert(f->valid_bits >= n);1605 1606 z = f->acc & ((1 << n)-1);1607 f->acc >>= n;1608 f->valid_bits -= n;1609 return z;
3948 unmodified lines