Fix METADAPT-A encoding
This commit is contained in:
parent
15b8a1a328
commit
fb7ab2487e
@ -195,7 +195,7 @@ func encodeMessageA(writer io.Writer, trans int64, method uint16, data []byte) e
|
||||
tape.EncodeI16(buffer[8:10], method)
|
||||
length, ok := tape.U16CastSafe(len(data))
|
||||
if !ok { return ErrPayloadTooLarge }
|
||||
tape.EncodeI16(data[10:12], length)
|
||||
tape.EncodeI16(buffer[10:12], length)
|
||||
copy(buffer[12:], data)
|
||||
_, err := writer.Write(buffer)
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user