Skip to content

Commit

Permalink
[Fix] Avoid out-of-bounds span access in sample preview (only an issu…
Browse files Browse the repository at this point in the history
…e in debug builds).

git-svn-id: https://source.openmpt.org/svn/openmpt/trunk/OpenMPT@20268 56274372-70c3-4bfc-bfc3-4c3a0b034d27
  • Loading branch information
sagamusix committed Mar 7, 2024
1 parent f93130f commit d8cec58
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions mptrack/MainFrm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1710,9 +1710,10 @@ void CMainFrame::PreparePreview(ModCommand::NOTE note, int volume)
m[0].instr = 1;
}
// Infinite loop on second row
m[1 * 2].command = CMD_POSITIONJUMP;
m[1 * 2 + 1].command = CMD_PATTERNBREAK;
m[1 * 2 + 1].param = 1;
m = m_WaveFile.Patterns[0].GetRow(1);
m[0].command = CMD_POSITIONJUMP;
m[1].command = CMD_PATTERNBREAK;
m[1].param = 1;
}
m_WaveFile.InitPlayer(true);
}
Expand Down

0 comments on commit d8cec58

Please sign in to comment.