diff --git a/ChangeLog b/ChangeLog index a2178066a..1a619a91e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,5 @@ + * fix issue when receiving a torrent with 0-sized padfiles as magnet link * fix issue resuming 1.0.x downloads with a file priority 0 * fix torrent_status::next_announce * fix pad-file scalability issue diff --git a/src/torrent.cpp b/src/torrent.cpp index adf9e948f..488c70698 100644 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -2018,6 +2018,8 @@ namespace libtorrent } else { + need_picker(); + int num_pad_files = 0; TORRENT_ASSERT(block_size() > 0); file_storage const& fs = m_torrent_file->files(); @@ -2029,10 +2031,6 @@ namespace libtorrent m_padding += boost::uint32_t(fs.file_size(i)); - // TODO: instead of creating the picker up front here, - // maybe this whole section should move to need_picker() - need_picker(); - peer_request pr = m_torrent_file->map_file(i, 0, fs.file_size(i)); int off = pr.start & (block_size()-1); if (off != 0) { pr.length -= block_size() - off; pr.start += block_size() - off; }