1
0
mirror of https://github.com/golang/go synced 2024-11-12 04:00:23 -07:00

gc: fix export of '\'' and '\\' constants

Fixes Windows build.

R=ken2
CC=golang-dev
https://golang.org/cl/5472046
This commit is contained in:
Russ Cox 2011-12-08 22:43:31 -05:00
parent 9a358df947
commit 2ab9bb6aaf

View File

@ -363,7 +363,7 @@ Vconv(Fmt *fp)
return fmtprint(fp, "%B", v->u.xval);
case CTRUNE:
x = mpgetfix(v->u.xval);
if(' ' <= x && x < 0x80)
if(' ' <= x && x < 0x80 && x != '\\' && x != '\'')
return fmtprint(fp, "'%c'", (int)x);
if(0 <= x && x < (1<<16))
return fmtprint(fp, "'\\u%04ux'", (int)x);