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) ...@@ -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) ...@@ -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;
......
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