diff --git a/util/bits.go b/util/bits.go index f20feaf..e0f7030 100644 --- a/util/bits.go +++ b/util/bits.go @@ -3,7 +3,7 @@ package util // Tells if bit is set in given byte, // if bitN <= 0 - always returns false func GetBit(b byte, bitN int) bool { - if bitN == 0 { + if bitN <= 0 { return false } return b&byte(1<