forked from premiere/premiere-libtorrent
return a full bitmask for pieces when seeding, don't allocate empty allocations for 0-sized bitmasks
This commit is contained in:
parent
f722d2951a
commit
98157176c2
|
@ -7583,6 +7583,11 @@ namespace libtorrent
|
|||
for (int i = 0; i < num_pieces; ++i)
|
||||
if (m_picker->have_piece(i)) st->pieces.set_bit(i);
|
||||
}
|
||||
else if (is_seed())
|
||||
{
|
||||
int num_pieces = m_picker->num_pieces();
|
||||
st->pieces.resize(num_pieces, true);
|
||||
}
|
||||
st->num_pieces = num_have();
|
||||
st->num_seeds = num_seeds();
|
||||
if ((flags & torrent_handle::query_distributed_copies) && m_picker.get())
|
||||
|
|
Loading…
Reference in New Issue