]> Cypherpunks repositories - gostls13.git/commitdiff
os: add missing byte to FileMode buffer
authorStefan Nilsson <snilsson@nada.kth.se>
Fri, 23 Mar 2012 21:16:57 +0000 (08:16 +1100)
committerRob Pike <r@golang.org>
Fri, 23 Mar 2012 21:16:57 +0000 (08:16 +1100)
32 bytes is enough for all FileMode bits.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5853044

src/pkg/os/types.go

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