diff --git a/src/bufio/bufio_test.go b/src/bufio/bufio_test.go index c829d2b064..34d70312f7 100644 --- a/src/bufio/bufio_test.go +++ b/src/bufio/bufio_test.go @@ -550,7 +550,7 @@ func TestWriter(t *testing.T) { t.Errorf("%s: %d bytes written", context, len(written)) } for l := 0; l < len(written); l++ { - if written[i] != data[i] { + if written[l] != data[l] { t.Errorf("wrong bytes written") t.Errorf("want=%q", data[0:len(written)]) t.Errorf("have=%q", written)