minor fix to num_seeds

This commit is contained in:
arvidn 2017-02-19 19:34:52 +02:00 committed by Arvid Norberg
parent 6e65851b2d
commit 430ff6d7b4
2 changed files with 2 additions and 2 deletions

View File

@ -12224,7 +12224,7 @@ namespace libtorrent
st->pieces.resize(num_pieces, false);
}
st->num_pieces = num_have();
st->num_seeds = num_seeds();
st->num_seeds = num_seeds() - int(m_num_connecting_seeds);
if ((flags & torrent_handle::query_distributed_copies) && m_picker.get())
{
boost::tie(st->distributed_full_copies, st->distributed_fraction) =

View File

@ -149,7 +149,7 @@ namespace libtorrent
res = ConvertUTF32toUTF8(const_cast<const UTF32**>(&cp), cp + 1, &start, start + 5, lenientConversion);
TORRENT_ASSERT(res == conversionOK);
for (int i = 0; i < start - sequence; ++i)
for (int i = 0; i < std::min(5, int(start - sequence)); ++i)
tmp_path += char(sequence[i]);
}