Commit 8777759f authored by Russ Cox's avatar Russ Cox

gc: make 'invalid rune in string' a little less cryptic

Fixes #371.

R=ken2
https://golang.org/cl/164091
parent b0683bd7
......@@ -1065,7 +1065,9 @@ loop:
goto loop;
c = chartorune(&rune, str);
if(rune == Runeerror && c == 1) {
yyerror("illegal rune in string");
lineno = lexlineno;
yyerror("illegal UTF-8 sequence in comment or string");
flusherrors();
for(c=0; c<i; c++)
print(" %.2x", *(uchar*)(str+c));
print("\n");
......
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