From 4e955ed3794f37c91a699e25b97de71cb08077ad Mon Sep 17 00:00:00 2001 From: "Timothy B. Terriberry" <tterribe@xiph.org> Date: Tue, 21 Dec 2010 16:36:31 -0800 Subject: [PATCH] Fix a typo in ec_byte_write_done(). 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcelt/entenc.c b/libcelt/entenc.c index d4dcda74..9be46b1f 100644 --- a/libcelt/entenc.c +++ b/libcelt/entenc.c @@ -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; } } -- GitLab