diff --git a/stb_vorbis.c b/stb_vorbis.c index 4e67726..2662d15 100644 --- a/stb_vorbis.c +++ b/stb_vorbis.c @@ -1601,6 +1601,8 @@ static uint32 get_bits(vorb *f, int n) } } + assert(f->valid_bits >= n); + z = f->acc & ((1 << n)-1); f->acc >>= n; f->valid_bits -= n;