DuplicateWithCount bug fix.

This commit is contained in:
luosheng
2023-02-12 08:10:09 +08:00
parent b463bb9414
commit 9226f78931

View File

@@ -32,6 +32,7 @@ namespace Modbus.Net
{
length = length * 256 + receiveMessage[pos + countPos];
}
if (length == 0) { break; }
length += otherCount;
if (pos + length > receiveMessage.Length) break;
byte[] currentPackage = new byte[length];