From 231f328d356e27826d246175c64fd4c1acb1a5d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C5=A0tefa=C5=88=C3=A1k?= Date: Fri, 30 May 2025 11:37:08 +0200 Subject: [PATCH] Update Struct.cs Fixed count when there is amount of boolean values which doesn't count up to one byte. --- S7.Net/Types/Struct.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/S7.Net/Types/Struct.cs b/S7.Net/Types/Struct.cs index 136638ac..8168e7b5 100644 --- a/S7.Net/Types/Struct.cs +++ b/S7.Net/Types/Struct.cs @@ -78,7 +78,7 @@ public static int GetStructSize(Type structType) break; } } - return (int)numBytes; + return (int)Math.Ceiling(numBytes); } ///