Commit 0336ab4d authored by Jacob Vosmaer's avatar Jacob Vosmaer

Midi parser comments

parent 9bbd1769
......@@ -91,13 +91,15 @@ midi_parse(uint8_t midi_byte)
return;
}
if (midi_byte & 0x80) {
if (midi_byte >= 128) {
// We were expecting a 7-bit midi data value. Something is wrong.
reset_status();
clear_data();
return;
}
if (parsed_len >= data_len(status)) {
// Data overflow.
clear_data();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment