DuplicateWithCount bug fix.
This commit is contained in:
@@ -32,6 +32,7 @@ namespace Modbus.Net
|
|||||||
{
|
{
|
||||||
length = length * 256 + receiveMessage[pos + countPos];
|
length = length * 256 + receiveMessage[pos + countPos];
|
||||||
}
|
}
|
||||||
|
if (length == 0) { break; }
|
||||||
length += otherCount;
|
length += otherCount;
|
||||||
if (pos + length > receiveMessage.Length) break;
|
if (pos + length > receiveMessage.Length) break;
|
||||||
byte[] currentPackage = new byte[length];
|
byte[] currentPackage = new byte[length];
|
||||||
|
|||||||
Reference in New Issue
Block a user