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

@@ -96,7 +96,7 @@ QVariantMap serialize(const BitTorrent::Torrent &torrent)
const auto adjustRatio = [](const qreal ratio) -> qreal
{
return (ratio > BitTorrent::Torrent::MAX_RATIO) ? -1 : ratio;
return (ratio >= BitTorrent::Torrent::MAX_RATIO) ? -1 : ratio;
};
const auto getLastActivityTime = [&torrent]() -> qlonglong