Update S7.Net/Conversion.cs

Co-authored-by: Günther Foidl <gue@korporal.at>
This commit is contained in:
Himmelt
2023-08-16 17:18:33 +08:00
committed by GitHub
parent 2ec73224c1
commit 9c0fea721a

View File

@@ -159,7 +159,7 @@ namespace S7.Net
/// <param name="value"></param>
public static void SetBit(this ref byte data, int bitPosition, bool value)
{
if (bitPosition < 0 || bitPosition > 7)
if ((uint)bitPosition > 7)
{
return;
}