diff options
Diffstat (limited to 'src/pkg/strings')
-rw-r--r-- | src/pkg/strings/reader.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/pkg/strings/reader.go b/src/pkg/strings/reader.go index 914faa003..4eae90e73 100644 --- a/src/pkg/strings/reader.go +++ b/src/pkg/strings/reader.go @@ -18,10 +18,7 @@ func (r *Reader) Read(b []byte) (n int, err os.Error) { if len(s) == 0 { return 0, os.EOF } - for n < len(s) && n < len(b) { - b[n] = s[n] - n++ - } + n = copy(b, s) *r = s[n:] return } |