1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-23 21:14:33 +00:00

Correctly iterate through the files of torrent

PR #15535.
This commit is contained in:
Vladimir Golovnev 2021-10-07 10:48:00 +03:00 committed by GitHub
parent 4d480b8761
commit c382191e75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -85,7 +85,7 @@ PreviewSelectDialog::PreviewSelectDialog(QWidget *parent, const BitTorrent::Torr
m_ui->previewList->setAlternatingRowColors(pref->useAlternatingRowColors());
// Fill list in
const QVector<qreal> fp = torrent->filesProgress();
for (int i = 0; i <= torrent->filesCount(); ++i)
for (int i = 0; i < torrent->filesCount(); ++i)
{
QString fileName = Utils::Fs::fileName(torrent->filePath(i));
if (fileName.endsWith(QB_EXT))