mirror of
https://github.com/jwetzell/showbridge-go.git
synced 2026-04-26 21:05:30 +00:00
fix incorrect slip frame encoding
This commit is contained in:
@@ -59,9 +59,9 @@ func (sf *SlipFramer) Encode(data []byte) []byte {
|
||||
for _, byteToEncode := range data {
|
||||
switch byteToEncode {
|
||||
case END:
|
||||
encodedBytes = append(encodedBytes, ESC_END)
|
||||
encodedBytes = append(encodedBytes, ESC, ESC_END)
|
||||
case ESC:
|
||||
encodedBytes = append(encodedBytes, ESC_ESC)
|
||||
encodedBytes = append(encodedBytes, ESC, ESC_ESC)
|
||||
default:
|
||||
encodedBytes = append(encodedBytes, byteToEncode)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user