summaryrefslogtreecommitdiff
path: root/src/seq
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2007-08-10 09:41:17 +0200
committerClemens Ladisch <clemens@ladisch.de>2007-08-10 09:41:17 +0200
commitf2835d86fab3372a9d7cb976cbdaa2569966fd60 (patch)
tree9b5418b0974cb674197e0d71815ad28dfba78672 /src/seq
parent5090cf3520c88fb7ed0bdddc1e13d8d5de7f11d5 (diff)
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.
Diffstat (limited to 'src/seq')
-rw-r--r--src/seq/seq_midi_event.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/seq/seq_midi_event.c b/src/seq/seq_midi_event.c
index 9c70377e..fd34a598 100644
--- a/src/seq/seq_midi_event.c
+++ b/src/seq/seq_midi_event.c
@@ -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) &&