mirror of
https://github.com/json-iterator/go.git
synced 2024-11-24 08:22:14 +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?
|
||||
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 adapter.iter.loadMore()
|
||||
return iter.loadMore()
|
||||
}
|
||||
|
||||
// Buffered remaining buffer
|
||||
|
Loading…
Reference in New Issue
Block a user