Commit 7b5af511 authored by Rob Pike's avatar Rob Pike
Browse files

bufio: fix overflow calculation in Scan

I was being too clever, as usual. Write the obvious code to make sure
that when we grow the buffer we don't overflow.

Change-Id: I1641831177b0bb8a89ab6e9bcabccf6c2fcfe1d2
Reviewed-on: https://go-review.googlesource.com/14781


Reviewed-by: default avatarMinux Ma <minux@golang.org>
parent e643dc79
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment