summaryrefslogtreecommitdiff
path: root/src/Network/Address.hs
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2017-06-16 01:38:21 -0400
committerjoe <joe@jerkface.net>2017-06-16 01:38:21 -0400
commita79e92856c5fcb87ec4e0ecaee32110c99959a4e (patch)
tree9645bd6ce6b13457363b45a060eb3011a125bca7 /src/Network/Address.hs
parentb9a2c3dd44f5dd59157676fb386584a148d854cb (diff)
Fixed off-by-one error in Data.Bits-based testIdBit.
Diffstat (limited to 'src/Network/Address.hs')
-rw-r--r--src/Network/Address.hs2
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
568testIdBit :: FiniteBits bs => bs -> Word -> Bool 568testIdBit :: FiniteBits bs => bs -> Word -> Bool
569testIdBit bs i = testBit bs (fromIntegral (finiteBitSize bs - fromIntegral i)) 569testIdBit bs i = testBit bs (fromIntegral (finiteBitSize bs - 1 - fromIntegral i))
570{-# INLINE testIdBit #-} 570{-# INLINE testIdBit #-}
571 571
572------------------------------------------------------------------------ 572------------------------------------------------------------------------