Author: sagamusix
Date: Sat Jun 1 23:44:32 2024
New Revision: 20900
URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20900
Log:
[Fix] FTM: Possible crash when combining a sample modification command disabling the loop with "clone track", which would then copy over the loop flag from the sample slot again.
Modified:
trunk/OpenMPT/soundlib/InstrumentSynth.cpp
Modified: trunk/OpenMPT/soundlib/InstrumentSynth.cpp
==============================================================================
--- trunk/OpenMPT/soundlib/InstrumentSynth.cpp Sat Jun 1 23:43:03 2024 (r20899)
+++ trunk/OpenMPT/soundlib/InstrumentSynth.cpp Sat Jun 1 23:44:32 2024 (r20900)
@@ -752,8 +752,7 @@
chn.nNewIns = srcChn.nNewIns;
chn.pModSample = srcChn.pModSample;
chn.position = srcChn.position;
- if(srcChn.pModSample)
- chn.dwFlags = (chn.dwFlags & CHN_CHANNELFLAGS) | srcChn.pModSample->uFlags;
+ chn.dwFlags = (chn.dwFlags & CHN_CHANNELFLAGS) | (srcChn.dwFlags & CHN_SAMPLEFLAGS);
chn.nLength = srcChn.nLength;
chn.nLoopStart = srcChn.nLoopStart;
chn.nLoopEnd = srcChn.nLoopEnd;
|