1
0
mirror of https://github.com/golang/go synced 2024-11-18 13:54:59 -07:00

cmd/gc: avoid %#016x, which really means Go's %#014x

(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>
This commit is contained in:
Russ Cox 2015-02-07 06:51:44 -05:00
parent 7c3eeda66f
commit f58a5cb9e2

View 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) {