From 8a39ee361feb9bf46d728ff1ba4f07ca1d9610b1 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Thu, 19 Jun 2014 09:22:53 +0200 Subject: Imported Upstream version 1.3 --- src/pkg/bufio/scan.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/pkg/bufio/scan.go') diff --git a/src/pkg/bufio/scan.go b/src/pkg/bufio/scan.go index 423505fbc..715ce071e 100644 --- a/src/pkg/bufio/scan.go +++ b/src/pkg/bufio/scan.go @@ -135,7 +135,7 @@ func (s *Scanner) Scan() bool { } // Must read more data. // First, shift data to beginning of buffer if there's lots of empty space - // or space is neded. + // or space is needed. if s.start > 0 && (s.end == len(s.buf) || s.start > len(s.buf)/2) { copy(s.buf, s.buf[s.start:s.end]) s.end -= s.start @@ -172,7 +172,7 @@ func (s *Scanner) Scan() bool { break } loop++ - if loop > 100 { + if loop > maxConsecutiveEmptyReads { s.setErr(io.ErrNoProgress) break } @@ -306,7 +306,7 @@ func isSpace(r rune) bool { return true } switch r { - case '\u1680', '\u180e', '\u2028', '\u2029', '\u202f', '\u205f', '\u3000': + case '\u1680', '\u2028', '\u2029', '\u202f', '\u205f', '\u3000': return true } return false -- cgit v1.2.3