Skip to content

Commit

Permalink
Fix skipping deleted data in elements (#82)
Browse files Browse the repository at this point in the history
NOP sections are not skipped properly.
  • Loading branch information
klauspost authored Mar 11, 2023
1 parent e473c1e commit d82c779
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions parsed_object.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,9 @@ func (o *Object) NextElementBytes(dst *Iter) (name []byte, t Type, err error) {
o.off += 2
case TagObjectEnd:
return nil, TypeNone, nil
case TagNop:
o.off += int(v & JSONVALUEMASK)
return o.NextElementBytes(dst)
default:
return nil, TypeNone, fmt.Errorf("object: unexpected tag %c", byte(v>>56))
}
Expand Down

0 comments on commit d82c779

Please sign in to comment.