Commit 772cea81 authored by Matthew Dempsky's avatar Matthew Dempsky

cmd/compile: fix off-by-1 in getr

Introduced by (and missed during code review of) golang.org/cl/19847.

Change-Id: I03b76f36e5da69c31730380592dfa1c32570e17f
Reviewed-on: https://go-review.googlesource.com/19912
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: default avatarRobert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 9e173f9d
......@@ -1873,7 +1873,7 @@ redo:
// The string conversion here makes a copy for passing
// to fmt.Printf, so that buf itself does not escape and
// can be allocated on the stack.
Yyerror("illegal UTF-8 sequence % x", string(buf[:i+1]))
Yyerror("illegal UTF-8 sequence % x", string(buf[:i]))
}
if r == BOM {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment