]> Cypherpunks repositories - gostls13.git/commit
fmt: don't unread eof scanning %x
authorRob Pike <r@golang.org>
Mon, 10 Aug 2015 03:21:28 +0000 (13:21 +1000)
committerRob Pike <r@golang.org>
Mon, 10 Aug 2015 03:34:48 +0000 (03:34 +0000)
commitfe3d8d4db04d0589177a7a2164dff46928129331
tree00013929e40eb62d5c29f0da235eb9104df8ef6c
parente7f4df73320b5bea5d38191a9e3afc1ead43b91a
fmt: don't unread eof scanning %x

When scanning a hex byte at EOF, the code was ungetting the eof,
which backed up the input and caused double-scanning of a byte.

Delete the call to UnreadRune.

This line appeared in 1.5 for some reason; it was not in 1.4 and
should be removed again for 1.5

Fixes #12090.

Change-Id: Iad1ce8e7db8ec26615c5271310f4b0228cca7d78
Reviewed-on: https://go-review.googlesource.com/13461
Reviewed-by: Andrew Gerrand <adg@golang.org>
src/fmt/scan.go
src/fmt/scan_test.go