diff --git a/libtransmission/peer-mgr.c b/libtransmission/peer-mgr.c index 044bb8da8..1a773df53 100644 --- a/libtransmission/peer-mgr.c +++ b/libtransmission/peer-mgr.c @@ -401,7 +401,7 @@ getPeer( Torrent * torrent, struct peer_atom * atom ) if( peer == NULL ) { peer = peerNew( atom ); - tr_bitfieldConstruct( &peer->have, torrent->tor->blockCount ); + tr_bitfieldConstruct( &peer->have, torrent->tor->info.pieceCount ); tr_bitfieldConstruct( &peer->blame, torrent->tor->blockCount ); tr_ptrArrayInsertSorted( &torrent->peers, peer, peerCompare ); }