1
0
mirror of https://github.com/json-iterator/go.git synced 2025-07-03 23:30:41 +02:00

#133 validate json when Skip()

This commit is contained in:
Tao Wen
2017-07-18 09:45:25 +08:00
parent 5eded4f6ae
commit f6da8e62c3
14 changed files with 88 additions and 44 deletions

View File

@ -259,8 +259,7 @@ func (iter *Iterator) loadMore() bool {
}
func (iter *Iterator) unreadByte() {
if iter.head == 0 {
iter.ReportError("unreadByte", "unread too many bytes")
if iter.Error != nil {
return
}
iter.head--