mirror of
https://github.com/json-iterator/go.git
synced 2025-05-13 21:36:29 +02:00
fix #264 check io.EOF when test decoder.More
This commit is contained in:
parent
f88871b601
commit
6c702ce12a
@ -77,10 +77,14 @@ func (adapter *Decoder) Decode(obj interface{}) error {
|
|||||||
|
|
||||||
// More is there more?
|
// More is there more?
|
||||||
func (adapter *Decoder) More() bool {
|
func (adapter *Decoder) More() bool {
|
||||||
if adapter.iter.head != adapter.iter.tail {
|
iter := adapter.iter
|
||||||
|
if iter.Error != nil {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if iter.head != iter.tail {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return adapter.iter.loadMore()
|
return iter.loadMore()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Buffered remaining buffer
|
// Buffered remaining buffer
|
||||||
|
Loading…
x
Reference in New Issue
Block a user