Commit 7a455d4e authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

Another 16-bit fix.

parent b30dd9e1
......@@ -123,11 +123,11 @@ void ec_enc_done(ec_enc *_this){
of trailing zeros, and write that to the stream.
This is guaranteed to yield the smallest possible encoding.*/
if(_this->low){
unsigned end;
ec_uint32 end;
end=EC_CODE_TOP;
/*Ensure that the end value is in the range.*/
if(end-_this->low>=_this->rng){
unsigned msk;
ec_uint32 msk;
msk=EC_CODE_TOP-1;
do{
msk>>=1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment