Developing lightweight computation at the DSG edge

Commit f541b87c authored by Mathias Weber's avatar Mathias Weber
Browse files

off by one error

parent 9621aabf
......@@ -70,7 +70,7 @@ func encodeMsg(message proto.Message, msgCode byte, writer io.Writer) (err error
msgsize := len(msg)
buf := make([]byte, 5)
binary.BigEndian.PutUint32(buf[0:4], uint32(msgsize))
buf[5] = msgCode
buf[4] = msgCode
writer.Write(buf)
writer.Write(msg)
return nil
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment