Fix a bug in ma_prev_power_of_2().

This commit is contained in:
David Reid
2026-01-09 18:51:02 +10:00
parent e9eccf49a3
commit 4bed03a65e
+1 -1
View File
@@ -13240,7 +13240,7 @@ static MA_INLINE void ma_zero_memory_64(void* dst, ma_uint64 sizeInBytes)
static MA_INLINE unsigned int ma_prev_power_of_2(unsigned int x)
{
return ma_next_power_of_2(x) >> 1;
return ma_next_power_of_2(x + 1) >> 1;
}
static MA_INLINE unsigned int ma_round_to_power_of_2(unsigned int x)