修正读写数据时偏移地址的错误

This commit is contained in:
nnhy 2015-12-08 03:58:20 +00:00
parent e3e0016506
commit 83d493d333
1 changed files with 1 additions and 1 deletions

View File

@ -52,7 +52,7 @@ void PingMessage::WriteData(Stream& ms, byte code, const Array& bs) const
if(len > remain) len = remain; if(len > remain) len = remain;
ms.Write(code); // 子功能码 ms.Write(code); // 子功能码
ms.Write((byte)0x01); // 起始地址 ms.Write((byte)0x00); // 起始地址
ms.Write(len); // 长度 ms.Write(len); // 长度
ms.Write(Array(bs.GetBuffer(), len)); ms.Write(Array(bs.GetBuffer(), len));