diff options
Diffstat (limited to 'libtorrent/src/torrent.cpp')
-rwxr-xr-x | libtorrent/src/torrent.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libtorrent/src/torrent.cpp b/libtorrent/src/torrent.cpp index efb97a77d..0f6ee3f18 100755 --- a/libtorrent/src/torrent.cpp +++ b/libtorrent/src/torrent.cpp @@ -1174,7 +1174,7 @@ namespace libtorrent const std::vector<piece_picker::downloading_piece>& dl_queue = m_picker->get_download_queue(); - const int blocks_per_piece = piece_size / m_block_size; + const int blocks_per_piece = (piece_size + m_block_size - 1) / m_block_size; for (std::vector<piece_picker::downloading_piece>::const_iterator i = dl_queue.begin(); i != dl_queue.end(); ++i) |