Skip to content

Commit

Permalink
fix section reader
Browse files Browse the repository at this point in the history
  • Loading branch information
willscott committed Mar 3, 2022
1 parent e0f4c23 commit 1a03108
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion traversal/selector/matcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func (s Slice) Slice(n datamodel.Node) (datamodel.Node, error) {
return nil, err
}

sr := io.NewSectionReader(readerat{rdr}, s.From, s.To)
sr := io.NewSectionReader(readerat{rdr}, s.From, s.To-s.From)
return basicnode.NewBytesFromReader(sr), nil
}
bytes, err := n.AsBytes()
Expand Down

0 comments on commit 1a03108

Please sign in to comment.