From 461403c0f506bae01304ac3faee34fe6ba4edf48 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Wed, 13 May 2020 17:32:16 +1000 Subject: [PATCH] Fix Client torrent "of %d bytes" in status --- client.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/client.go b/client.go index 41645367..ebbf21b3 100644 --- a/client.go +++ b/client.go @@ -140,7 +140,12 @@ func (cl *Client) WriteStatus(_w io.Writer) { } fmt.Fprint(w, "\n") if t.info != nil { - fmt.Fprintf(w, "%f%% of %d bytes (%s)", 100*(1-float64(t.bytesMissingLocked())/float64(t.info.TotalLength())), t.length, humanize.Bytes(uint64(t.info.TotalLength()))) + fmt.Fprintf( + w, + "%f%% of %d bytes (%s)", + 100*(1-float64(t.bytesMissingLocked())/float64(t.info.TotalLength())), + *t.length, + humanize.Bytes(uint64(*t.length))) } else { w.WriteString("") } -- 2.48.1