From cdaf4a86277fa287e0a5a73901c83a297f513881 Mon Sep 17 00:00:00 2001 From: Josh Coalson Date: Sun, 27 May 2001 18:40:57 +0000 Subject: [PATCH] make the parallel fix to FLAC__bitbuffer_read_raw_int64() --- src/libFLAC/bitbuffer.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/libFLAC/bitbuffer.c b/src/libFLAC/bitbuffer.c index 0a9645d..1eb32df 100644 --- a/src/libFLAC/bitbuffer.c +++ b/src/libFLAC/bitbuffer.c @@ -1333,7 +1333,11 @@ bool FLAC__bitbuffer_read_raw_int64(FLAC__BitBuffer *bb, int64 *val, const unsig /* we hold off updating bb->total_consumed_bits until the end */ } else { - *val = (bb->buffer[bb->consumed_bytes] & (0xff >> bb->consumed_bits)) >> (i-bits_); + /* bits_ must be < 7 if we get to here */ + v = (bb->buffer[bb->consumed_bytes] & (0xff >> bb->consumed_bits)); + v <<= (64-i); + *val = (int64)v; + *val >>= (64-bits_); bb->consumed_bits += bits_; bb->total_consumed_bits += bits_; return true; -- 2.7.4