mirror of
https://github.com/golang/go
synced 2024-11-19 03:54:42 -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 {
|
if w > NByte {
|
||||||
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++ {
|
for i := 0; i < w; i++ {
|
||||||
buf[i] = ' ';
|
buf[i] = ' ';
|
||||||
}
|
}
|
||||||
if left {
|
if left {
|
||||||
s = string(buf)[0:w] + s;
|
s = string(buf) + s;
|
||||||
} else {
|
} else {
|
||||||
s = s + string(buf)[0:w];
|
s = s + string(buf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user