]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/pprof: fix help message formatting error
authorHana Kim <hakim@google.com>
Thu, 31 May 2018 17:16:24 +0000 (13:16 -0400)
committerHyang-Ah Hana Kim <hyangah@gmail.com>
Thu, 31 May 2018 17:29:10 +0000 (17:29 +0000)
Pprof usage message includes "%" symbols. Misuse of Fprintf caused
the message to be interpreted as a format string and corrupted the usage
message.

Change-Id: I4732b491e2368cff9fdbfe070c125228d6f506fd
Reviewed-on: https://go-review.googlesource.com/115595
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/pprof/readlineui.go

index 67fb7aa49ca918be51b59088fe3c84f07dc66e58..6e91816f9be1be4a753256b114575c29d85ecb9d 100644 (file)
@@ -86,7 +86,7 @@ func (r *readlineUI) print(withColor bool, args ...interface{}) {
        if withColor {
                text = colorize(text)
        }
-       fmt.Fprintf(r.term, text)
+       fmt.Fprint(r.term, text)
 }
 
 // colorize prints the msg in red using ANSI color escapes.