From 9f2a7ec3e482830e6baa8d57d6d30a193cbb5922 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Sat, 3 Feb 2018 13:29:48 +1100 Subject: [PATCH] Fix peerExtensionBytes.SetBit --- handshake.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handshake.go b/handshake.go index 60a54620..0262e81c 100644 --- a/handshake.go +++ b/handshake.go @@ -51,7 +51,7 @@ func (pex peerExtensionBytes) SupportsFast() bool { } func (pex *peerExtensionBytes) SetBit(bit ExtensionBit) { - pex[7-bit/8] |= 1 << bit % 8 + pex[7-bit/8] |= 1 << (bit % 8) } func (pex peerExtensionBytes) GetBit(bit ExtensionBit) bool { -- 2.44.0