mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
seq_midi_event: fix parsing of F9/FD bytes
Check for a valid event type when encoding a system real-time message to prevent the bytes F9 or FD resulting in an empty sequencer message.
This commit is contained in:
parent
5090cf3520
commit
f2835d86fa
1 changed files with 1 additions and 1 deletions
|
|
@ -308,7 +308,7 @@ int snd_midi_event_encode_byte(snd_midi_event_t *dev, int c, snd_seq_event_t *ev
|
|||
ev->type = status_event[ST_SPECIAL + c - 0xf0].event;
|
||||
ev->flags &= ~SND_SEQ_EVENT_LENGTH_MASK;
|
||||
ev->flags |= SND_SEQ_EVENT_LENGTH_FIXED;
|
||||
return 1;
|
||||
return ev->type != SND_SEQ_EVENT_NONE;
|
||||
}
|
||||
|
||||
if ((c & 0x80) &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue