From b8661b82327753cd0aedd2ce4ec38a7a2d163e7a Mon Sep 17 00:00:00 2001 From: probonopd Date: Sun, 27 Feb 2022 14:48:07 +0100 Subject: [PATCH] Disallow values larger than 127 and 31 https://github.com/probonopd/MiniDexed/issues/11#issuecomment-1053560391 [ci skip] --- src/minidexed.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/minidexed.cpp b/src/minidexed.cpp index 4cb4640..9ac0984 100644 --- a/src/minidexed.cpp +++ b/src/minidexed.cpp @@ -159,7 +159,7 @@ void CMiniDexed::MIDIPacketHandler (unsigned nCable, u8 *pPacket, unsigned nLeng { if (pPacket[1] == MIDI_CC_BANK_SELECT_LSB) { - if (pPacket[2] > 128) + if (pPacket[2] > 127) { return; } @@ -173,7 +173,7 @@ void CMiniDexed::MIDIPacketHandler (unsigned nCable, u8 *pPacket, unsigned nLeng if (pPacket[0] == MIDI_PROGRAM_CHANGE) { - if(pPacket[1] > 32) { + if(pPacket[1] > 31) { return; } printf ("Loading voice %u\n", (unsigned) pPacket[1]);