Skip to content

Commit

Permalink
fix cursor issue for skipArray, skipValue
Browse files Browse the repository at this point in the history
  • Loading branch information
KimHyeonwoo committed Jul 18, 2022
1 parent 61705df commit 3e25104
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/decoder/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ func (s *Stream) skipArray(depth int64) error {
s.cursor = cursor
if s.read() {
_, cursor, p = s.statForRetry()
cursor++
continue
}
return errors.ErrUnexpectedEndOfJSON("string of object", cursor)
Expand Down Expand Up @@ -403,6 +404,7 @@ func (s *Stream) skipValue(depth int64) error {
s.cursor = cursor
if s.read() {
_, cursor, p = s.statForRetry()
cursor++
continue
}
return errors.ErrUnexpectedEndOfJSON("value of string", s.totalOffset())
Expand Down

0 comments on commit 3e25104

Please sign in to comment.