Commit f2c7a201 authored by Russ Cox's avatar Russ Cox

8l: fix print line number format, buffer overflow

R=ken2
https://golang.org/cl/165059
parent 3b858fb8
......@@ -55,18 +55,18 @@ Pconv(Fmt *fp)
switch(p->as) {
case ATEXT:
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);
break;
}
default:
sprint(str, "(%ld) %A %D,%D",
sprint(str, "(%d) %A %D,%D",
p->line, p->as, &p->from, &p->to);
break;
case ADATA:
case AINIT:
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);
break;
}
......@@ -94,7 +94,7 @@ xsymname(Sym *s)
int
Dconv(Fmt *fp)
{
char str[40], s[20];
char str[200], s[200];
Adr *a;
int i;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment