Blame 0001-Convert-int-to-string-using-rune.patch

92d9a43
From c38fc1a2bd79c534328e7451db6e708d7cccd972 Mon Sep 17 00:00:00 2001
92d9a43
From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m@gmail.com>
92d9a43
Date: Sat, 8 Aug 2020 01:13:39 +0200
92d9a43
Subject: [PATCH] Convert int to string using rune()
92d9a43
MIME-Version: 1.0
92d9a43
Content-Type: text/plain; charset=UTF-8
92d9a43
Content-Transfer-Encoding: 8bit
92d9a43
92d9a43
See https://github.com/golang/go/issues/32479
92d9a43
92d9a43
Fix #111.
92d9a43
92d9a43
Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com>
92d9a43
---
92d9a43
 diffmatchpatch/patch.go | 2 +-
92d9a43
 1 file changed, 1 insertion(+), 1 deletion(-)
92d9a43
92d9a43
diff --git a/diffmatchpatch/patch.go b/diffmatchpatch/patch.go
92d9a43
index 223c43c..0dbe3bd 100644
92d9a43
--- a/diffmatchpatch/patch.go
92d9a43
+++ b/diffmatchpatch/patch.go
92d9a43
@@ -324,7 +324,7 @@ func (dmp *DiffMatchPatch) PatchAddPadding(patches []Patch) string {
92d9a43
 	paddingLength := dmp.PatchMargin
92d9a43
 	nullPadding := ""
92d9a43
 	for x := 1; x <= paddingLength; x++ {
92d9a43
-		nullPadding += string(x)
92d9a43
+		nullPadding += string(rune(x))
92d9a43
 	}
92d9a43
 
92d9a43
 	// Bump all the patches forward.
92d9a43
-- 
92d9a43
2.26.2
92d9a43