diff --git a/S7.Net/Conversion.cs b/S7.Net/Conversion.cs index 2c61f02..2bf0014 100644 --- a/S7.Net/Conversion.cs +++ b/S7.Net/Conversion.cs @@ -159,7 +159,7 @@ namespace S7.Net /// public static void SetBit(this ref byte data, int bitPosition, bool value) { - if (bitPosition < 0 || bitPosition > 7) + if ((uint)bitPosition > 7) { return; }