diff options
Diffstat (limited to 'src/pkg/regexp/regexp.go')
-rw-r--r-- | src/pkg/regexp/regexp.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pkg/regexp/regexp.go b/src/pkg/regexp/regexp.go index b378a669c..b1baf67c7 100644 --- a/src/pkg/regexp/regexp.go +++ b/src/pkg/regexp/regexp.go @@ -868,7 +868,7 @@ func (re *Regexp) ReplaceAllString(src, repl string) string { lastMatchEnd = a[1]; // Advance past this match; always advance at least one character. - rune, width := utf8.DecodeRuneInString(src[searchPos:len(src)]); + _, width := utf8.DecodeRuneInString(src[searchPos:len(src)]); if searchPos + width > a[1] { searchPos += width; } else if searchPos + 1 > a[1] { @@ -912,7 +912,7 @@ func (re *Regexp) ReplaceAll(src, repl []byte) []byte { lastMatchEnd = a[1]; // Advance past this match; always advance at least one character. - rune, width := utf8.DecodeRune(src[searchPos:len(src)]); + _, width := utf8.DecodeRune(src[searchPos:len(src)]); if searchPos + width > a[1] { searchPos += width; } else if searchPos + 1 > a[1] { |