Skip to content

Commit

Permalink
fix #9: crash when input NoteOn between one SysEx
Browse files Browse the repository at this point in the history
  • Loading branch information
Kainosuke Obata committed Oct 21, 2019
1 parent 304abe0 commit 7c4c745
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Swimi/Parser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ public class Parser {
parsingData.append(byte)
notifier.notify(messageData: parsingData)
clearData()
return
case (_, .some(_), .some(.endOfExclusive)):
// error case:
// End Of Exclusive received but not parsing System Exclusive now.
// We will just ignore this.
clearData()
return

case (true, nil, _):
// impossible condition
Expand Down

0 comments on commit 7c4c745

Please sign in to comment.