diff --git a/soundlib/Load_stm.cpp b/soundlib/Load_stm.cpp index fd559f27ae2..b8898a2de6a 100644 --- a/soundlib/Load_stm.cpp +++ b/soundlib/Load_stm.cpp @@ -49,7 +49,7 @@ struct STMSampleHeader && mptSmp.nLoopEnd != 0xFFFF) { mptSmp.uFlags = CHN_LOOP; - mptSmp.nLoopEnd = std::min(mptSmp.nLoopEnd, mptSmp.nLength); + mptSmp.nLength = std::max(mptSmp.nLoopEnd, mptSmp.nLength); } } };