mirror of
https://github.com/nothings/stb
synced 2024-12-15 12:22:55 +03:00
Added debugging check on line 1604
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.
This commit is contained in:
parent
fcd0a0bfaa
commit
2e78eb603b
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user