| Index: proto/decode.go |
| =================================================================== |
| --- a/proto/decode.go |
| +++ b/proto/decode.go |
| @@ -479,10 +479,7 @@ |
| if err != nil { |
| return err |
| } |
| - lb := len(b) |
| - if lb == 0 { |
| - return nil |
| - } |
| + |
| x := (*[]uint8)(unsafe.Pointer(base + p.offset)) |
| y := *x |
| @@ -494,6 +491,7 @@ |
| } |
| l := len(y) |
| + lb := len(b) |
| if l+lb > c { |
| // incremental growth is max(len(slice)*1.5, len(slice)+len(bytes)) |
| g := l * 3 / 2 |