From: Matt Joiner Date: Thu, 26 Jun 2014 08:08:14 +0000 (+1000) Subject: Trivial fix for one of the last commits X-Git-Tag: v1.0.0~1705 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=33d53cf9e522236d1490e99f183c4734981804f5;p=btrtrc.git Trivial fix for one of the last commits --- diff --git a/client.go b/client.go index 08e13416..48889843 100644 --- a/client.go +++ b/client.go @@ -463,7 +463,7 @@ func (me *Client) connectionLoop(t *torrent, c *connection) error { err = errors.New("received unexpected bitfield") break } - c.PeerPieces = msg.Bitfield[:len(t.NumPieces())] + c.PeerPieces = msg.Bitfield[:t.NumPieces()] for index, has := range c.PeerPieces { if has { me.peerGotPiece(t, c, index)