Fix ratio handling

PR #22638.
This commit is contained in:
Vladimir Golovnev
2025-05-01 14:18:18 +03:00
committed by GitHub
parent e7dee969e1
commit 6cd6267c26
11 changed files with 16 additions and 21 deletions

View File

@@ -293,7 +293,7 @@ QString TransferListModel::displayValue(const BitTorrent::Torrent *torrent, cons
if (hideValues && (value <= 0))
return {};
return ((static_cast<int>(value) == -1) || (value > BitTorrent::Torrent::MAX_RATIO))
return ((static_cast<int>(value) == -1) || (value >= BitTorrent::Torrent::MAX_RATIO))
? C_INFINITY : Utils::String::fromDouble(value, 2);
};