mirror of
https://github.com/transmission/transmission
synced 2025-01-31 03:12:44 +00:00
when showing the stats for selected files, progress on a transfer with no selected files should be 0%, not -100%
This commit is contained in:
parent
1eb8292844
commit
d15d48e75e
1 changed files with 2 additions and 1 deletions
|
@ -109,7 +109,8 @@ static TR_INLINE float tr_cpPercentComplete( const tr_completion * cp )
|
|||
|
||||
static TR_INLINE float tr_cpPercentDone( const tr_completion * cp )
|
||||
{
|
||||
return tr_getRatio( cp->sizeNow, tr_cpSizeWhenDone( cp ) );
|
||||
const double ratio = tr_getRatio( cp->sizeNow, tr_cpSizeWhenDone( cp ) );
|
||||
return (ratio == TR_RATIO_NA || ratio == TR_RATIO_INF) ? 0.0f : ratio;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue