Cast uint8_t value to unsigned before doing bit shift

This commit is contained in:
Dayeong Lee
2023-05-05 23:52:47 +09:00
parent acbdce637e
commit 1538cb6d11

View File

@@ -322,7 +322,7 @@ static inline void accu_load(struct lc3_bits_accu *accu,
for ( ; nbytes; nbytes--) {
accu->v >>= 8;
accu->v |= *(--buffer->p_bw) << (LC3_ACCU_BITS - 8);
accu->v |= (unsigned)*(--buffer->p_bw) << (LC3_ACCU_BITS - 8);
}
if (accu->n >= 8) {