diff options
author | joe <joe@jerkface.net> | 2017-06-16 01:38:21 -0400 |
---|---|---|
committer | joe <joe@jerkface.net> | 2017-06-16 01:38:21 -0400 |
commit | a79e92856c5fcb87ec4e0ecaee32110c99959a4e (patch) | |
tree | 9645bd6ce6b13457363b45a060eb3011a125bca7 /src | |
parent | b9a2c3dd44f5dd59157676fb386584a148d854cb (diff) |
Fixed off-by-one error in Data.Bits-based testIdBit.
Diffstat (limited to 'src')
-rw-r--r-- | src/Network/Address.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Network/Address.hs b/src/Network/Address.hs index e4ec09b4..0fbd191a 100644 --- a/src/Network/Address.hs +++ b/src/Network/Address.hs | |||
@@ -566,7 +566,7 @@ testIdBit (NodeId bs) i | |||
566 | -} | 566 | -} |
567 | 567 | ||
568 | testIdBit :: FiniteBits bs => bs -> Word -> Bool | 568 | testIdBit :: FiniteBits bs => bs -> Word -> Bool |
569 | testIdBit bs i = testBit bs (fromIntegral (finiteBitSize bs - fromIntegral i)) | 569 | testIdBit bs i = testBit bs (fromIntegral (finiteBitSize bs - 1 - fromIntegral i)) |
570 | {-# INLINE testIdBit #-} | 570 | {-# INLINE testIdBit #-} |
571 | 571 | ||
572 | ------------------------------------------------------------------------ | 572 | ------------------------------------------------------------------------ |