Skip to content

Commit

Permalink
Avoid writing volume commands in DPCM channel
Browse files Browse the repository at this point in the history
Fixes #331.
  • Loading branch information
Gumball2415 committed Dec 25, 2024
1 parent 81be243 commit 8baa876
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Source/PatternCompiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,8 @@ void CPatternCompiler::CompileData(int Track, int Pattern, int Channel)
}
else {
DPCMInst = ChanNote.Instrument;
Volume = MAX_VOLUME;

// double check if DPCMInst is a valid instrument index
if (!(DPCMInst >= 0 && DPCMInst < MAX_INSTRUMENTS)) {
#ifdef _DEBUG
Expand Down

0 comments on commit 8baa876

Please sign in to comment.