]> granicus.if.org Git - transmission/commitdiff
fix incorrect eta value
authorMitchell Livingston <livings124@transmissionbt.com>
Mon, 7 Apr 2008 05:00:07 +0000 (05:00 +0000)
committerMitchell Livingston <livings124@transmissionbt.com>
Mon, 7 Apr 2008 05:00:07 +0000 (05:00 +0000)
libtransmission/torrent.c
macosx/NSStringAdditions.m

index fe81671910a0396d91f036f25b870dc4ef62972e..f0c81564cd5189f02959d5125ba95fbf194fb51e 100644 (file)
@@ -664,7 +664,7 @@ tr_torrentStat( tr_torrent * tor )
     else if( s->rateDownload < 0.1 )
         s->eta = TR_ETA_UNKNOWN;
     else
-        s->eta = s->leftUntilDone / (s->rateDownload / 1024.0);
+        s->eta = s->leftUntilDone / s->rateDownload / 1024.0;
 
     s->ratio = tr_getRatio( s->uploadedEver,
                             s->downloadedEver ? s->downloadedEver : s->haveValid );
index f5bad692d13d79c4c1732794d33408353433dd2b..8e0d14a3b262745c29d1f34f941a730a1b260987 100644 (file)
@@ -54,7 +54,7 @@
         convertedSize = size / 1048576.0;
         unit = NSLocalizedString(@"MB", "File size - megabytes");
     }
-    else if (size < 1099511627776)
+    else if (size < 1099511627776.0)
     {
         convertedSize = size / 1073741824.0;
         unit = NSLocalizedString(@"GB", "File size - gigabytes");