Fix meta length parsing for >127 byte entries

In find_note, the meta_len was hardcoded as a single byte encoding, but per
the spec and some files with long comments and copyrights, it is actually
encoded as a varlen.  Use the varlen parser (which defaults to the old
behavior of 1-byte for <128 len fields) instead.
pull/10/head
Earle F. Philhower, III 7 years ago
parent 8c47ddfd12
commit 5883cb239b
  1. 2
      miditones.c

@ -838,7 +838,7 @@ void find_note (int tracknum) {
}
if (event == 0xff) { /* meta-event */
meta_cmd = *t->trkptr++;
meta_length = *t->trkptr++;
meta_length = get_varlen (&t->trkptr);
switch (meta_cmd) {
case 0x00:
if (logparse)

Loading…
Cancel
Save