From: Matt Joiner <anacrolix@gmail.com>
Date: Sat, 3 Feb 2018 02:29:48 +0000 (+1100)
Subject: Fix peerExtensionBytes.SetBit
X-Git-Tag: v1.0.0~217
X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=9f2a7ec3e482830e6baa8d57d6d30a193cbb5922;p=btrtrc.git

Fix peerExtensionBytes.SetBit
---

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 {