]> Cypherpunks repositories - gostls13.git/commitdiff
gc: fix export of '\'' and '\\' constants
authorRuss Cox <rsc@golang.org>
Fri, 9 Dec 2011 03:43:31 +0000 (22:43 -0500)
committerRuss Cox <rsc@golang.org>
Fri, 9 Dec 2011 03:43:31 +0000 (22:43 -0500)
Fixes Windows build.

R=ken2
CC=golang-dev
https://golang.org/cl/5472046

src/cmd/gc/fmt.c

index 35acb5b84bc91ec490f36533f19b2ca7afd121af..9733095019d78ac218856380e18f87f4572cb457 100644 (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);