1
0
mirror of https://github.com/golang/go synced 2024-11-25 20:57:57 -07:00

Update fmt, refl, and rpc to exploit bug fixes in compiler

R=gri
OCL=14806
CL=14806
This commit is contained in:
Rob Pike 2008-09-04 10:39:04 -07:00
parent 6c72bfa55b
commit 4c9d84f06a

View File

@ -112,14 +112,14 @@ func (f *Fmt) pad(s string) {
if w > NByte {
w = NByte;
}
var buf[NByte] byte; // BUG: should be able to allocate variable size
buf := new([]byte, w);
for i := 0; i < w; i++ {
buf[i] = ' ';
}
if left {
s = string(buf)[0:w] + s;
s = string(buf) + s;
} else {
s = s + string(buf)[0:w];
s = s + string(buf);
}
}
}