mirror of
https://github.com/transmission/transmission
synced 2024-12-27 18:18:10 +00:00
fixup! refactor: tr_completion (#2220)
fix: incorrect calculation in amountDone
This commit is contained in:
parent
35fe175f2a
commit
9516e8a923
1 changed files with 1 additions and 1 deletions
|
@ -92,7 +92,7 @@ void tr_completion::amountDone(float* tab, size_t n_tabs) const
|
|||
auto const blocks_per_tab = std::size(blocks_) / n_tabs;
|
||||
for (size_t i = 0; i < n_tabs; ++i)
|
||||
{
|
||||
auto const begin = i * n_tabs;
|
||||
auto const begin = i * blocks_per_tab;
|
||||
auto const end = std::min(begin + blocks_per_tab, std::size(blocks_));
|
||||
auto const numerator = blocks_.count(begin, end);
|
||||
tab[i] = (double)numerator / (end - begin);
|
||||
|
|
Loading…
Reference in a new issue