From: <sv...@op...> - 2024-04-08 18:40:00
|
Author: sagamusix Date: Mon Apr 8 20:39:45 2024 New Revision: 20534 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20534 Log: Merged revision(s) 20533 from trunk/OpenMPT: [Fix] Possible crash when merging sequences. ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/soundlib/ModSequence.cpp Modified: branches/OpenMPT-1.31/soundlib/ModSequence.cpp ============================================================================== --- branches/OpenMPT-1.31/soundlib/ModSequence.cpp Mon Apr 8 20:39:23 2024 (r20533) +++ branches/OpenMPT-1.31/soundlib/ModSequence.cpp Mon Apr 8 20:39:45 2024 (r20534) @@ -484,6 +484,7 @@ firstSeq.reserve(firstOrder + lengthTrimmed); firstSeq.push_back(); // Separator item RestartPosToPattern(seqNum); + patternsFixed.resize(m_sndFile.Patterns.Size(), SEQUENCEINDEX_INVALID); // Previous line might have increased pattern count for(ORDERINDEX ord = 0; ord < lengthTrimmed; ord++) { PATTERNINDEX pat = seq[ord]; @@ -522,6 +523,7 @@ } } m_Sequences.erase(m_Sequences.begin() + 1, m_Sequences.end()); + m_currentSeq = 0; return true; } |