diff --git a/bpfix/cmd/bpfix.go b/bpfix/cmd/bpfix.go index 2fde3836f..ccdae1656 100644 --- a/bpfix/cmd/bpfix.go +++ b/bpfix/cmd/bpfix.go @@ -65,7 +65,7 @@ func processFile(filename string, in io.Reader, out io.Writer, fixRequest bpfix. if err != nil { return err } - r := bytes.NewBuffer(src) + r := bytes.NewBuffer(append([]byte(nil), src...)) file, errs := parser.Parse(filename, r, parser.NewScope(nil)) if len(errs) > 0 { for _, err := range errs {