Fix calculation of byte length for VarType.Bit

Fixes #389
This commit is contained in:
Michael Croes
2021-05-10 20:23:32 +02:00
parent 5225c8bffd
commit a1b4694ef6

View File

@@ -184,7 +184,7 @@ namespace S7.Net
switch (varType)
{
case VarType.Bit:
return varCount + 7 / 8;
return (varCount + 7) / 8;
case VarType.Byte:
return (varCount < 1) ? 1 : varCount;
case VarType.String: