Fix ratio handling

PR #22638.
This commit is contained in:
Vladimir Golovnev 2025-05-01 14:18:18 +03:00 committed by Vladimir Golovnev (Glassez)
parent f4e6b515c2
commit b3690494ab
No known key found for this signature in database
GPG key ID: 52A2C7DEE2DFA6F7
11 changed files with 19 additions and 24 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);
};