diff --git a/src/base/bittorrent/torrentinfo.cpp b/src/base/bittorrent/torrentinfo.cpp index 95a5b5add..d9c4d3791 100644 --- a/src/base/bittorrent/torrentinfo.cpp +++ b/src/base/bittorrent/torrentinfo.cpp @@ -217,7 +217,7 @@ QStringList TorrentInfo::filesForPiece(int pieceIndex) const return QStringList(); std::vector files( - nativeInfo()->map_block(pieceIndex, 0, nativeInfo()->piece_length())); + nativeInfo()->map_block(pieceIndex, 0, nativeInfo()->piece_size(pieceIndex))); QStringList res; for (const libtorrent::file_slice& s: files) { res.append(filePath(s.file_index));