mirror of
https://github.com/golang/go
synced 2024-11-22 14:15:05 -07:00
8l: fix print line number format, buffer overflow
R=ken2 https://golang.org/cl/165059
This commit is contained in:
parent
3b858fb808
commit
f2c7a20142
@ -55,18 +55,18 @@ Pconv(Fmt *fp)
|
|||||||
switch(p->as) {
|
switch(p->as) {
|
||||||
case ATEXT:
|
case ATEXT:
|
||||||
if(p->from.scale) {
|
if(p->from.scale) {
|
||||||
sprint(str, "(%ld) %A %D,%d,%D",
|
sprint(str, "(%d) %A %D,%d,%D",
|
||||||
p->line, p->as, &p->from, p->from.scale, &p->to);
|
p->line, p->as, &p->from, p->from.scale, &p->to);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
sprint(str, "(%ld) %A %D,%D",
|
sprint(str, "(%d) %A %D,%D",
|
||||||
p->line, p->as, &p->from, &p->to);
|
p->line, p->as, &p->from, &p->to);
|
||||||
break;
|
break;
|
||||||
case ADATA:
|
case ADATA:
|
||||||
case AINIT:
|
case AINIT:
|
||||||
case ADYNT:
|
case ADYNT:
|
||||||
sprint(str, "(%ld) %A %D/%d,%D",
|
sprint(str, "(%d) %A %D/%d,%D",
|
||||||
p->line, p->as, &p->from, p->from.scale, &p->to);
|
p->line, p->as, &p->from, p->from.scale, &p->to);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -94,7 +94,7 @@ xsymname(Sym *s)
|
|||||||
int
|
int
|
||||||
Dconv(Fmt *fp)
|
Dconv(Fmt *fp)
|
||||||
{
|
{
|
||||||
char str[40], s[20];
|
char str[200], s[200];
|
||||||
Adr *a;
|
Adr *a;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user