From 79bd450e0ec4d020ad433ee8c622a1d41d988385 Mon Sep 17 00:00:00 2001 From: ZYunH Date: Thu, 19 Sep 2019 20:41:42 +0800 Subject: [PATCH] Use 0xf instead of 15 --- bytesconv.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bytesconv.go b/bytesconv.go index 82b1640754..e0262e7a32 100644 --- a/bytesconv.go +++ b/bytesconv.go @@ -448,7 +448,7 @@ func AppendQuotedArg(dst, src []byte) []byte { case c == ' ': dst = append(dst, '+') case quotedArgShouldEscapeTable[int(c)]: - dst = append(dst, '%', upperhex[c>>4], upperhex[c&15]) + dst = append(dst, '%', upperhex[c>>4], upperhex[c&0xf]) default: dst = append(dst, c) }