Disallow values larger than 127 and 31

https://github.com/probonopd/MiniDexed/issues/11#issuecomment-1053560391
[ci skip]
pull/32/head
probonopd 3 years ago committed by GitHub
parent 05b93b28b7
commit b8661b8232
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      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]);

Loading…
Cancel
Save