mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-19 04:49:47 -07: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();
|
return QStringList();
|
||||||
|
|
||||||
std::vector<libtorrent::file_slice> files(
|
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;
|
QStringList res;
|
||||||
for (const libtorrent::file_slice& s: files) {
|
for (const libtorrent::file_slice& s: files) {
|
||||||
res.append(filePath(s.file_index));
|
res.append(filePath(s.file_index));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue