Open rubend30 opened 1 year ago
On line:
https://github.com/S7NetPlus/s7netplus/blob/develop/S7.Net/Types/TypeHelper.cs#L18
stream.Write(converter(val), 0, 4);
Should be replaced by the actual size of the type like in the other method.
var typeSize = Marshal.SizeOf(default(T)); stream.Write(converter(val), 0, typeSize);
var typeSize = Marshal.SizeOf(default(T));
stream.Write(converter(val), 0, typeSize);
On line:
https://github.com/S7NetPlus/s7netplus/blob/develop/S7.Net/Types/TypeHelper.cs#L18
stream.Write(converter(val), 0, 4);
Should be replaced by the actual size of the type like in the other method.
var typeSize = Marshal.SizeOf(default(T));
stream.Write(converter(val), 0, typeSize);