Fix a typo in ec_byte_write_done().
authorTimothy B. Terriberry <tterribe@xiph.org>
Wed, 22 Dec 2010 00:36:31 +0000 (16:36 -0800)
committerJean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Wed, 22 Dec 2010 01:16:24 +0000 (20:16 -0500)
Introduced by 30df6cf3.
This should have only affected the output in the case where the last
 few extra bits caused us to bust, and wouldn't have prevented us
 from detecting the error.

libcelt/entenc.c

index d4dcda7..9be46b1 100644 (file)
@@ -76,7 +76,7 @@ int ec_byte_write_done(ec_byte_buffer *_b,int _start_bits_available,
          would corrupt the range coder data, and that's more important.*/
       if(_start_bits_available<_end_bits_used){
         _end_bits_used=_start_bits_available;
-        _end_byte&=(1<_start_bits_available)-1;
+        _end_byte&=(1<<_start_bits_available)-1;
         ret=-1;
       }
     }