]> Cypherpunks repositories - gostls13.git/commit
bufio: bulletproof UnreadRune
authorRob Pike <r@golang.org>
Thu, 14 Oct 2010 00:12:43 +0000 (17:12 -0700)
committerRob Pike <r@golang.org>
Thu, 14 Oct 2010 00:12:43 +0000 (17:12 -0700)
commit52e3c99cfb32e5ff91a2a15d506d2148af8fc813
tree155e3e6d47260f8c1685e5897d828bd84a3f4d17
parentd6df3017749bbe4737789c381b50ef71eb11b900
bufio: bulletproof UnreadRune
After a fill(), there is nothing to back up.  Make sure UnreadRune
recognizes the situation.

Fixes #1137.
(Stops the crash, but doesn't make UnreadRune usable after a Peek()).

R=rsc
CC=golang-dev
https://golang.org/cl/2498041
src/pkg/bufio/bufio.go
src/pkg/bufio/bufio_test.go