mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
bufio: make string(int) conversion safer
Updates #42792. Change-Id: I7e53426c41e5609d9dadceb300f7983ba7ad6577 Reviewed-on: https://go-review.googlesource.com/c/go/+/273526 Run-TryBot: Akhil Indurti <aindurti@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
This commit is contained in:
parent
b94346e69b
commit
358d35455d
1 changed files with 1 additions and 1 deletions
|
|
@ -146,7 +146,7 @@ func TestReader(t *testing.T) {
|
|||
for i := 0; i < len(texts)-1; i++ {
|
||||
texts[i] = str + "\n"
|
||||
all += texts[i]
|
||||
str += string(rune(i)%26 + 'a')
|
||||
str += string(rune(i%26 + 'a'))
|
||||
}
|
||||
texts[len(texts)-1] = all
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue