Skip to content

Commit 0e999f3

Browse files
committed
Fix infinite loop when receiving midi message over 4 bytes in size
Signed-off-by: falkTX <falktx@falktx.com>
1 parent 58339d4 commit 0e999f3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

plugins/Nekobi/DistrhoPluginNekobi.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,13 +373,12 @@ void DistrhoPluginNekobi::run(const float**, float** outputs, uint32_t frames, c
373373
fSynth.nugget_remains = XSYNTH_NUGGET_SIZE;
374374

375375
/* process any ready events */
376-
while (curEventIndex < midiEventCount && framesDone == midiEvents[curEventIndex].frame)
376+
for (; curEventIndex < midiEventCount && framesDone == midiEvents[curEventIndex].frame; ++curEventIndex)
377377
{
378378
if (midiEvents[curEventIndex].size > MidiEvent::kDataSize)
379379
continue;
380380

381381
nekobee_handle_raw_event(&fSynth, midiEvents[curEventIndex].size, midiEvents[curEventIndex].data);
382-
curEventIndex++;
383382
}
384383

385384
/* calculate the sample count (burstSize) for the next nekobee_voice_render() call to be the smallest of:

0 commit comments

Comments
 (0)