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:
David Finkel
2026-02-23 19:42:32 -05:00
committed by Nicholas Husin
parent ca94cf1247
commit e1e73b316c

View File

@@ -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