diff --git a/CHANGES.md b/CHANGES.md index 10c022a0..37b8aa1f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -8,6 +8,7 @@ v0.11.23 - TBD * Fixed a memory leak in the resource manager when opening a file fails. * Fixed an assertion failure in the resource manager when opening a file fails. * Fixed a compilation warning relating to `MA_FALLTHROUGH` +* Fixed an undefined behavior error in the s16 to s32 conversion routine. * Fixed an undefined behavior error relating to MurmurHash3. * Fixed an undefined behavior error with the LCG random number generator. * Fixed a compilation error with `MA_NO_SSE2`. diff --git a/miniaudio.h b/miniaudio.h index dfd3f744..eca50be7 100644 --- a/miniaudio.h +++ b/miniaudio.h @@ -45496,7 +45496,7 @@ static MA_INLINE void ma_pcm_s16_to_s32__reference(void* dst, const void* src, m ma_uint64 i; for (i = 0; i < count; i += 1) { - dst_s32[i] = src_s16[i] << 16; + dst_s32[i] = (ma_int32)src_s16[i] << 16; } (void)ditherMode;