Skip to content

Commit

Permalink
Per issue #98 - recover issue #38 patch
Browse files Browse the repository at this point in the history
Return EOF no nil on end of file in ReadByte.
  • Loading branch information
clbanning committed Aug 2, 2022
1 parent bafcbe1 commit c77d66e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xml.go
Expand Up @@ -913,7 +913,8 @@ func (b *byteReader) Read(p []byte) (int, error) {
func (b *byteReader) ReadByte() (byte, error) {
_, err := b.r.Read(b.b)
if len(b.b) > 0 {
return b.b[0], nil
// issue #38
return b.b[0], err
}
var c byte
return c, err
Expand Down

0 comments on commit c77d66e

Please sign in to comment.