Skip to content

Commit

Permalink
parser: fix extra bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
xis committed Aug 22, 2021
1 parent 567798b commit 132a66e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,10 @@ process:
}

buf := make([]byte, 1024)
_, err := part.Read(buf)
n, err := part.Read(buf)
if err != nil {
if err == io.EOF {
buf = buf[:n]
data.Write(buf)
break
}
Expand Down

0 comments on commit 132a66e

Please sign in to comment.