mirror of
https://github.com/golang/go.git
synced 2026-04-02 09:20:29 +09:00
runtime: printquoted: fix decoderune call
go.dev/cl/742305 had a stale signature for decoderune, which was updated in go.dev/cl/725101 (converting an argument and return value from int to uint). Add appropriate conversions. Change-Id: Ia4e5bcbab4275d5a988c9dce552cd7590474b995 Reviewed-on: https://go-review.googlesource.com/c/go/+/748300 Reviewed-by: Alan Donovan <adonovan@google.com> Reviewed-by: Nicholas Husin <nsh@golang.org> Auto-Submit: Alan Donovan <adonovan@google.com> Reviewed-by: Nicholas Husin <husin@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
committed by
Nicholas Husin
parent
ca94cf1247
commit
e1e73b316c
@@ -217,7 +217,7 @@ func printquoted(s string) {
|
||||
continue
|
||||
case runeError:
|
||||
// Distinguish errors from a valid encoding of U+FFFD.
|
||||
if _, j := decoderune(s, i); j == i+1 {
|
||||
if _, j := decoderune(s, uint(i)); j == uint(i+1) {
|
||||
gwrite(bytes(`\x`))
|
||||
printhexopts(false, 2, uint64(s[i]))
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user