Blob Blame History Raw
From c65810c8cb065b69c4f817d026fc3f04d8c19af8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m@gmail.com>
Date: Tue, 4 Aug 2020 17:38:53 +0200
Subject: [PATCH] Convert int to string using rune()
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

See https://github.com/golang/go/issues/32479

Fix #2075.

Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com>
---
 vim25/xml/xml.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/vim25/xml/xml.go b/vim25/xml/xml.go
index 50117a00..a881c608 100644
--- a/vim25/xml/xml.go
+++ b/vim25/xml/xml.go
@@ -1056,7 +1056,7 @@ Input:
 					d.buf.WriteByte(';')
 					n, err := strconv.ParseUint(s, base, 64)
 					if err == nil && n <= unicode.MaxRune {
-						text = string(n)
+						text = string(rune(n))
 						haveText = true
 					}
 				}
@@ -1078,7 +1078,7 @@ Input:
 					if isName(name) {
 						s := string(name)
 						if r, ok := entity[s]; ok {
-							text = string(r)
+							text = string(rune(r))
 							haveText = true
 						} else if d.Entity != nil {
 							text, haveText = d.Entity[s]
-- 
2.26.2