Skip to content

Commit

Permalink
cmd/pprof: fix help message formatting error
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
hyangah committed May 31, 2018
1 parent 6b4828a commit 424c215
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cmd/pprof/readlineui.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 424c215

Please sign in to comment.