From: smasher164 Date: Thu, 26 Nov 2020 19:16:33 +0000 (-0500) Subject: bufio: make string(int) conversion safer X-Git-Tag: go1.16beta1~150 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=358d35455d;p=gostls13.git 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 TryBot-Result: Go Bot Reviewed-by: Ian Lance Taylor Reviewed-by: Robert Griesemer --- 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