mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-12-27 08:19:30 +08:00
Fix potential negative loop bound.
QTorrentHandle::num_files() could return -1 in these cases.
This commit is contained in:
parent
8897001567
commit
817b595222
@ -59,8 +59,8 @@ PreviewSelect::PreviewSelect(QWidget* parent, BitTorrent::TorrentHandle *const t
|
||||
previewList->setAlternatingRowColors(pref->useAlternatingRowColors());
|
||||
// Fill list in
|
||||
QVector<qreal> fp = torrent->filesProgress();
|
||||
uint nbFiles = torrent->filesCount();
|
||||
for (uint i = 0; i < nbFiles; ++i) {
|
||||
int nbFiles = torrent->filesCount();
|
||||
for (int i = 0; i < nbFiles; ++i) {
|
||||
QString fileName = torrent->fileName(i);
|
||||
if (fileName.endsWith(".!qB"))
|
||||
fileName.chop(4);
|
||||
|
Loading…
Reference in New Issue
Block a user