This commit is contained in:
wish
2023-08-30 21:08:40 +10:00
parent e6f1298935
commit 81e8d21d4b
2 changed files with 3 additions and 5 deletions

View File

@@ -25,8 +25,7 @@ func (m *MsgSysOperateRegister) Parse(bf *byteframe.ByteFrame, ctx *clientctx.Cl
m.SemaphoreID = bf.ReadUint32()
_ = bf.ReadUint16()
dataSize := bf.ReadUint16()
m.RawDataPayload = bf.ReadBytes(uint(dataSize) - 1)
_ = bf.ReadBytes(1) // Null terminator
m.RawDataPayload = bf.ReadBytes(uint(dataSize))
return nil
}