Missing localIndex offset on startIndex

Missing localIndex to offset start write position
This commit is contained in:
Mauro Destro
2016-09-12 12:08:50 +02:00
committed by GitHub
parent 07f3513f20
commit a2c68600cc

View File

@@ -548,7 +548,7 @@ namespace S7.Net
while (count > 0)
{
var maxToWrite = (int)Math.Min(count, 200);
ErrorCode lastError = WriteBytesWithASingleRequest(dataType, db, index, value.Skip(localIndex).Take(maxToWrite).ToArray());
ErrorCode lastError = WriteBytesWithASingleRequest(dataType, db, index + localIndex, value.Skip(localIndex).Take(maxToWrite).ToArray());
if (lastError != ErrorCode.NoError)
{
return lastError;