1
0
mirror of https://github.com/golang/go synced 2024-11-13 17:50:23 -07:00

os: add missing byte to FileMode buffer

32 bytes is enough for all FileMode bits.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5853044
This commit is contained in:
Stefan Nilsson 2012-03-24 08:16:57 +11:00 committed by Rob Pike
parent ae8d8abfeb
commit 2dfcbd0a3b

View File

@ -58,7 +58,7 @@ const (
func (m FileMode) String() string { func (m FileMode) String() string {
const str = "dalTLDpSugct" const str = "dalTLDpSugct"
var buf [20]byte var buf [32]byte // Mode is uint32.
w := 0 w := 0
for i, c := range str { for i, c := range str {
if m&(1<<uint(32-1-i)) != 0 { if m&(1<<uint(32-1-i)) != 0 {