diff --git a/Source/MIKMIDICommand.m b/Source/MIKMIDICommand.m index d83ffa4..4c63893 100644 --- a/Source/MIKMIDICommand.m +++ b/Source/MIKMIDICommand.m @@ -75,8 +75,11 @@ + (NSArray *)commandsWithMIDIPacket:(MIDIPacket *)inputPacket default: { __auto_type standardLength = MIKMIDIStandardLengthOfMessageForCommandType(commandType); - NSAssert(standardLength > 0, @"message length failed for command type %lu", commandType); - eventDataLength = (ByteCount)standardLength; + if ( standardLength > 0 ) { + eventDataLength = (ByteCount)standardLength; + } else { /* -1 or NSIntegerMin */ + eventDataLength = 1; /* assume 1 and hope for the best */ + } break; } }