diff options
author | qwx <devnull@localhost> | 2018-07-10 23:26:17 +0200 |
---|---|---|
committer | qwx <devnull@localhost> | 2018-07-10 23:26:17 +0200 |
commit | 4e04e03142a4e43c208dcf62ca165ad3a05dcc96 (patch) | |
tree | 33c862c71968a6a81eb0647d3f73f30479b6b2a6 /sys/src/games | |
parent | 24611cf5ed0f34edc6b843a621b63b710f51570a (diff) |
midi: properly skip sysex messages
this fixes playing any midi files containing such messages
example: prince of persia midis from vgmpf wiki
Diffstat (limited to 'sys/src/games')
-rw-r--r-- | sys/src/games/midi.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/src/games/midi.c b/sys/src/games/midi.c index 0b74bdc71..c6535219d 100644 --- a/sys/src/games/midi.c +++ b/sys/src/games/midi.c @@ -181,6 +181,11 @@ readevent(Tracker *src) get16(src); break; case 0xF: + if((t & 0xF) == 0){ + while(get8(src) != 0xF7) + ; + return; + } t = get8(src); n = get8(src); switch(t){ |