From c38fc1a2bd79c534328e7451db6e708d7cccd972 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= Date: Sat, 8 Aug 2020 01:13:39 +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 #111. Signed-off-by: Robert-André Mauchin --- diffmatchpatch/patch.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/diffmatchpatch/patch.go b/diffmatchpatch/patch.go index 223c43c..0dbe3bd 100644 --- a/diffmatchpatch/patch.go +++ b/diffmatchpatch/patch.go @@ -324,7 +324,7 @@ func (dmp *DiffMatchPatch) PatchAddPadding(patches []Patch) string { paddingLength := dmp.PatchMargin nullPadding := "" for x := 1; x <= paddingLength; x++ { - nullPadding += string(x) + nullPadding += string(rune(x)) } // Bump all the patches forward.