From ad987bb9108de2876f3bccdda7e9abb1bb66bfb6 Mon Sep 17 00:00:00 2001 From: Andy Bursavich Date: Wed, 8 Feb 2023 16:17:22 -0800 Subject: [PATCH] expfmt: only ignore io.EOF errors in TextParse.startOfLine Signed-off-by: Andy Bursavich --- expfmt/text_parse.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/expfmt/text_parse.go b/expfmt/text_parse.go index 84be0643..eb03080a 100644 --- a/expfmt/text_parse.go +++ b/expfmt/text_parse.go @@ -144,7 +144,9 @@ func (p *TextParser) startOfLine() stateFn { if p.skipBlankTab(); p.err != nil { // End of input reached. This is the only case where // that is not an error but a signal that we are done. - p.err = nil + if p.err == io.EOF { + p.err = nil + } return nil } switch p.currentByte {