]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/gc: avoid %#016x, which really means Go's %#014x
authorRuss Cox <rsc@golang.org>
Sat, 7 Feb 2015 11:51:44 +0000 (06:51 -0500)
committerRuss Cox <rsc@golang.org>
Wed, 11 Feb 2015 21:45:32 +0000 (21:45 +0000)
(In non-Go print formats, the 016 includes the leading 0x prefix.
No one noticed, but we were printing hex numbers with a minimum
of 30 digits, not 32.)

Change-Id: I10ff7a51a567ad7c8440418ac034be9e4b2d6bc1
Reviewed-on: https://go-review.googlesource.com/4592
Reviewed-by: Austin Clements <austin@google.com>
src/cmd/gc/reflect.c

index ec102dbeb520640ed5c980ec2dadeb3597190f97..ee00ff059bb147de4778c5bc1b81bd19b55a926d 100644 (file)
@@ -833,12 +833,12 @@ dcommontype(Sym *s, int ot, Type *t)
                for(i=0; i<8; i++)
                        x1 = x1<<8 | gcmask[i];
                if(widthptr == 4) {
-                       p = smprint("gcbits.%#016llux", x1);
+                       p = smprint("gcbits.0x%016llux", x1);
                } else {
                        x2 = 0;
                        for(i=0; i<8; i++)
                                x2 = x2<<8 | gcmask[i+8];
-                       p = smprint("gcbits.%#016llux%016llux", x1, x2);
+                       p = smprint("gcbits.0x%016llux%016llux", x1, x2);
                }
                sbits = pkglookup(p, runtimepkg);
                if((sbits->flags & SymUniq) == 0) {