mirror of
https://github.com/claunia/flac.git
synced 2026-05-20 23:26:26 +00:00
Fix CRC calculation for small blocks.
This commit is contained in:
committed by
Erik de Castro Lopo
parent
8874ecc082
commit
65c2796402
@@ -128,7 +128,7 @@ static inline void crc16_update_word_(FLAC__BitReader *br, brword word)
|
||||
|
||||
static inline void crc16_update_block_(FLAC__BitReader *br)
|
||||
{
|
||||
if(br->crc16_align)
|
||||
if(br->consumed_words > br->crc16_offset && br->crc16_align)
|
||||
crc16_update_word_(br, br->buffer[br->crc16_offset++]);
|
||||
|
||||
#if FLAC__BYTES_PER_WORD == 4
|
||||
|
||||
Reference in New Issue
Block a user