fix cursor issue for `skipArray`, `skipValue`

This commit is contained in:
KimHyeonwoo 2022-07-18 21:35:32 +09:00
parent 61705df089
commit 3e25104a7c
1 changed files with 2 additions and 0 deletions

View File

@ -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)
@ -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())