diff --git a/NEWS b/NEWS index ffb1a2ef2..083855fd6 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ ver 0.20.23 (not yet released) * protocol - emit "player" idle event when restarting the current song +* fix broken float to s32 conversion * new clang crash bug workaround ver 0.20.22 (2018/10/23) diff --git a/src/pcm/FloatConvert.hxx b/src/pcm/FloatConvert.hxx index 2270fbb90..70b00bcba 100644 --- a/src/pcm/FloatConvert.hxx +++ b/src/pcm/FloatConvert.hxx @@ -34,7 +34,7 @@ struct FloatToIntegerSampleConvert { typedef typename SrcTraits::long_type SL; typedef typename DstTraits::value_type DV; - static constexpr SV factor = 1 << (DstTraits::BITS - 1); + static constexpr SV factor = uintmax_t(1) << (DstTraits::BITS - 1); static_assert(factor > 0, "Wrong factor"); gcc_const