Ticket #3429: transmission_0percent_have.patch

File transmission_0percent_have.patch, 716 bytes (added by chantra, 12 years ago)
  • gtk/details.c

     
    798798            str = none;
    799799        else {
    800800            char buf2[32], unver[64], total[64];
    801             const double ratio = 100.0 * ( leftUntilDone ? ( haveValid + haveUnchecked ) / sizeWhenDone : 1 );
     801            const double ratio = 100.0 * ( leftUntilDone ? 1.0 * ( haveValid + haveUnchecked ) / sizeWhenDone : 1 );
    802802            tr_strlpercent( buf2, ratio, sizeof( buf2 ) );
    803803            tr_strlsize( total, haveUnchecked + haveValid, sizeof( total ) );
    804804            tr_strlsize( unver, haveUnchecked,             sizeof( unver ) );