Fix crash in build_synthetic_wave()

This commit is contained in:
MysterD 2023-11-08 13:45:07 -08:00
parent d83e4bad11
commit 0e37e21e4c
1 changed files with 1 additions and 0 deletions

View File

@ -865,6 +865,7 @@ void build_synthetic_wave(struct Note *note, struct SequenceChannelLayer *seqLay
note->instOrWave = (u8) seqLayer->seqChannel->instOrWave;
for (i = -1, pos = 0; pos < 0x40; pos += stepSize) {
i++;
if (i >= 0x40) { break; }
note->synthesisBuffers->samples[i] = gWaveSamples[seqLayer->seqChannel->instOrWave - 0x80][pos];
}