mirror of
https://github.com/golang/go
synced 2024-11-19 01:54:39 -07:00
Update fmt, refl, and rpc to exploit bug fixes in compiler
R=gri OCL=14806 CL=14806
This commit is contained in:
parent
6c72bfa55b
commit
4c9d84f06a
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user