mirror of
https://github.com/jwetzell/osc-go.git
synced 2026-08-20 05:48:59 +00:00
explicitly discard opening END when SLIP decoding
This commit is contained in:
@@ -78,7 +78,10 @@ func (s *SLIP) decode(bytes []byte) {
|
||||
}
|
||||
escapeNext = false
|
||||
} else if packetByte == END {
|
||||
if len(s.pendingBytes) > 0 {
|
||||
if len(s.pendingBytes) == 0 {
|
||||
// opening END byte, can discard
|
||||
continue
|
||||
} else {
|
||||
message, err := osc.MessageFromBytes(s.pendingBytes)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
|
||||
Reference in New Issue
Block a user