mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-10-22 18:56:08 +03:00
Use correct piece size while calling torrent_info::map_block()
This should fix crashes. Issue #4597
This commit is contained in:
parent
b24bdcb8d9
commit
8baa144933
1 changed files with 1 additions and 1 deletions
|
@ -217,7 +217,7 @@ QStringList TorrentInfo::filesForPiece(int pieceIndex) const
|
|||
return QStringList();
|
||||
|
||||
std::vector<libtorrent::file_slice> 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));
|
||||
|
|
Loading…
Reference in a new issue