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:
wph612 2020-03-24 20:49:40 -04:00 committed by GitHub
parent fcd0a0bfaa
commit 2e78eb603b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;