Ignore:
Timestamp:
Aug 21, 2007, 4:26:01 PM (14 years ago)
Author:
charles
Message:

fix NaN error reported by persept

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/completion.c

    r2891 r2897  
    312312    tr_cpEnsureDoneValid( cp );
    313313
    314     return (double)cp->doneHave / cp->doneTotal;
     314    return cp->doneTotal ? (double)cp->doneHave / cp->doneTotal : 1.0;
    315315}
    316316
Note: See TracChangeset for help on using the changeset viewer.