1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-23 08:13:27 +00:00

fix NaN error reported by persept

This commit is contained in:
Charles Kerr 2007-08-21 16:26:01 +00:00
parent 764f2983d3
commit 44f6cb1098

View file

@ -311,7 +311,7 @@ tr_cpPercentDone( const tr_completion_t * cp )
{
tr_cpEnsureDoneValid( cp );
return (double)cp->doneHave / cp->doneTotal;
return cp->doneTotal ? (double)cp->doneHave / cp->doneTotal : 1.0;
}
uint64_t