Skip to content

Commit b44db4e

Browse files
rscYinJiaJin
authored and
YinJiaJin
committed
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 <[email protected]>
1 parent 9b8148a commit b44db4e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/cmd/gc/reflect.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -833,12 +833,12 @@ dcommontype(Sym *s, int ot, Type *t)
833833
for(i=0; i<8; i++)
834834
x1 = x1<<8 | gcmask[i];
835835
if(widthptr == 4) {
836-
p = smprint("gcbits.%#016llux", x1);
836+
p = smprint("gcbits.0x%016llux", x1);
837837
} else {
838838
x2 = 0;
839839
for(i=0; i<8; i++)
840840
x2 = x2<<8 | gcmask[i+8];
841-
p = smprint("gcbits.%#016llux%016llux", x1, x2);
841+
p = smprint("gcbits.0x%016llux%016llux", x1, x2);
842842
}
843843
sbits = pkglookup(p, runtimepkg);
844844
if((sbits->flags & SymUniq) == 0) {

0 commit comments

Comments
 (0)