Skip to content

Commit

Permalink
Convert int to string using rune()
Browse files Browse the repository at this point in the history
See golang/go#32479

Fix #111.

Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com>
  • Loading branch information
eclipseo committed Aug 7, 2020
1 parent 58c5cb1 commit c38fc1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion diffmatchpatch/patch.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit c38fc1a

Please sign in to comment.