Fix METADAPT-B encoding
This commit is contained in:
parent
e872cbe8fd
commit
585c8038d3
@ -80,7 +80,7 @@ func encodeMessageB(writer io.Writer, method uint16, data []byte) error {
|
||||
tape.EncodeI16(buffer[:2], method)
|
||||
length, ok := tape.U16CastSafe(len(data))
|
||||
if !ok { return ErrPayloadTooLarge }
|
||||
tape.EncodeI16(data[2:4], length)
|
||||
tape.EncodeI16(buffer[2:4], length)
|
||||
copy(buffer[4:], data)
|
||||
_, err := writer.Write(buffer)
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user