mirror of
https://github.com/transmission/transmission
synced 2024-12-23 16:24:02 +00:00
fix NaN error reported by persept
This commit is contained in:
parent
764f2983d3
commit
44f6cb1098
1 changed files with 1 additions and 1 deletions
|
@ -311,7 +311,7 @@ tr_cpPercentDone( const tr_completion_t * cp )
|
||||||
{
|
{
|
||||||
tr_cpEnsureDoneValid( cp );
|
tr_cpEnsureDoneValid( cp );
|
||||||
|
|
||||||
return (double)cp->doneHave / cp->doneTotal;
|
return cp->doneTotal ? (double)cp->doneHave / cp->doneTotal : 1.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64_t
|
uint64_t
|
||||||
|
|
Loading…
Reference in a new issue