Skip to content

Commit

Permalink
Fix EPathSegmentData send wrong payload length
Browse files Browse the repository at this point in the history
  • Loading branch information
gisellevonbingen committed Jul 25, 2023
1 parent 813dc0c commit 7a83555
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Giselle.Net.EtherNetIP/CIP/EPathSegmentData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void ReadValue(byte readingType, DataProcessor processor)
public void WriteValue(DataProcessor processor)
{
var payload = this.Payload;
processor.WriteByte((byte)payload.Length);
processor.WriteByte((byte)((payload.Length + 1) / 2)); // +1 for pad
processor.WriteBytes(payload);

// Pad to words
Expand Down

0 comments on commit 7a83555

Please sign in to comment.