From: Russ Cox Date: Mon, 10 Jun 2013 20:13:25 +0000 (-0400) Subject: cmd/cc: fix lexbody for negative chars X-Git-Tag: go1.2rc2~1283 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=5b15b4443491d2405c494857819341186bb760ba;p=gostls13.git cmd/cc: fix lexbody for negative chars The new code matches the code in cc/lex.c and the #define GETC. This was causing problems scanning runtime·foo if the leading · byte was returned by the buffer fill. R=ken2 CC=golang-dev https://golang.org/cl/10167043 --- diff --git a/src/cmd/cc/lexbody b/src/cmd/cc/lexbody index c5d51b8fb6..ccc0c405d0 100644 --- a/src/cmd/cc/lexbody +++ b/src/cmd/cc/lexbody @@ -665,7 +665,7 @@ loop: goto pop; } fi.p = i->b + 1; - return i->b[0]; + return i->b[0] & 0xff; pop: iostack = i->link; @@ -678,7 +678,7 @@ pop: fi.c = i->c; if(--fi.c < 0) goto loop; - return *fi.p++; + return *fi.p++ & 0xff; } void