]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Client.WriteStatus: Raise the precision of the completion percentage
authorMatt Joiner <anacrolix@gmail.com>
Mon, 21 Mar 2016 21:33:08 +0000 (08:33 +1100)
committerMatt Joiner <anacrolix@gmail.com>
Mon, 21 Mar 2016 21:33:08 +0000 (08:33 +1100)
client.go

index 885b204e1ec851db883da423fb4bb9f60d065f78..6d8d7fbb6c7461b506e5fb920f52fa6fa384bcd9 100644 (file)
--- a/client.go
+++ b/client.go
@@ -248,7 +248,7 @@ func (cl *Client) WriteStatus(_w io.Writer) {
                }
                fmt.Fprint(w, "\n")
                if t.haveInfo() {
-                       fmt.Fprintf(w, "%f%% of %d bytes", 100*(1-float32(t.bytesLeft())/float32(t.length)), t.length)
+                       fmt.Fprintf(w, "%f%% of %d bytes", 100*(1-float64(t.bytesLeft())/float64(t.length)), t.length)
                } else {
                        w.WriteString("<missing metainfo>")
                }