diff options
author | smasher164 <aindurti@gmail.com> | 2020-11-26 14:16:33 -0500 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2020-11-28 03:50:50 +0000 |
commit | 358d35455d06b1ebee948efff123842490dcb797 (patch) | |
tree | 325739b7c3f6b7c2a878ec03a2a7d7945f89daae /src/bufio | |
parent | b94346e69bb01e1cd522ddfa9d09f41d9d4d3e98 (diff) | |
download | go-358d35455d06b1ebee948efff123842490dcb797.tar.gz go-358d35455d06b1ebee948efff123842490dcb797.zip |
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>
Diffstat (limited to 'src/bufio')
-rw-r--r-- | src/bufio/bufio_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bufio/bufio_test.go b/src/bufio/bufio_test.go index 75086f1f24..d7b34bd0d8 100644 --- a/src/bufio/bufio_test.go +++ b/src/bufio/bufio_test.go @@ -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 |