mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
utf8: make EncodeRune's destination the first argument.
R=r CC=golang-dev https://golang.org/cl/3364041
This commit is contained in:
parent
287045085d
commit
3cb4bdb9ce
14 changed files with 21 additions and 233 deletions
|
|
@ -172,7 +172,7 @@ func (b *Buffer) WriteRune(r int) (n int, err os.Error) {
|
|||
b.WriteByte(byte(r))
|
||||
return 1, nil
|
||||
}
|
||||
n = utf8.EncodeRune(r, b.runeBytes[0:])
|
||||
n = utf8.EncodeRune(b.runeBytes[0:], r)
|
||||
b.Write(b.runeBytes[0:n])
|
||||
return n, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue