Blame 0001-Convert-int-to-string-using-rune.patch
|
|
66a0636 |
From 49a6b70c987eef901d62f2ba51bd6c1b333abfe7 Mon Sep 17 00:00:00 2001
|
|
|
66a0636 |
From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m@gmail.com>
|
|
|
66a0636 |
Date: Wed, 5 Aug 2020 18:03:19 +0200
|
|
|
66a0636 |
Subject: [PATCH] Convert int to string using rune()
|
|
|
66a0636 |
MIME-Version: 1.0
|
|
|
66a0636 |
Content-Type: text/plain; charset=UTF-8
|
|
|
66a0636 |
Content-Transfer-Encoding: 8bit
|
|
|
66a0636 |
|
|
|
66a0636 |
See https://github.com/golang/go/issues/32479
|
|
|
66a0636 |
|
|
|
66a0636 |
Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com>
|
|
|
66a0636 |
---
|
|
|
66a0636 |
packet_test.go | 2 +-
|
|
|
66a0636 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
66a0636 |
|
|
|
66a0636 |
diff --git a/packet_test.go b/packet_test.go
|
|
|
66a0636 |
index 7ac9067..969774a 100644
|
|
|
66a0636 |
--- a/packet_test.go
|
|
|
66a0636 |
+++ b/packet_test.go
|
|
|
66a0636 |
@@ -154,7 +154,7 @@ func truncate(d string) string {
|
|
|
66a0636 |
|
|
|
66a0636 |
func (*packetSuite) TestAsciiHex(c *gc.C) {
|
|
|
66a0636 |
for b := 0; b < 256; b++ {
|
|
|
66a0636 |
- n, err := strconv.ParseInt(string(b), 16, 8)
|
|
|
66a0636 |
+ n, err := strconv.ParseInt(string(rune(b)), 16, 8)
|
|
|
66a0636 |
value, ok := asciiHex(byte(b))
|
|
|
66a0636 |
if err != nil || unicode.IsUpper(rune(b)) {
|
|
|
66a0636 |
c.Assert(ok, gc.Equals, false)
|
|
|
66a0636 |
--
|
|
|
66a0636 |
2.26.2
|
|
|
66a0636 |
|