7
7
"reflect"
8
8
"strings"
9
9
"unsafe"
10
+ "io"
10
11
)
11
12
12
13
const maxUint = ^ uint (0 )
@@ -206,7 +207,7 @@ func (decoder *fuzzyIntegerDecoder) Decode(ptr unsafe.Pointer, iter *jsoniter.It
206
207
defer iter .Pool ().ReturnIterator (newIter )
207
208
isFloat := strings .IndexByte (str , '.' ) != - 1
208
209
decoder .fun (isFloat , ptr , newIter )
209
- if newIter .Error != nil {
210
+ if newIter .Error != nil && newIter . Error != io . EOF {
210
211
iter .Error = newIter .Error
211
212
}
212
213
}
@@ -225,7 +226,7 @@ func (decoder *fuzzyFloat32Decoder) Decode(ptr unsafe.Pointer, iter *jsoniter.It
225
226
newIter := iter .Pool ().BorrowIterator ([]byte (str ))
226
227
defer iter .Pool ().ReturnIterator (newIter )
227
228
* ((* float32 )(ptr )) = newIter .ReadFloat32 ()
228
- if newIter .Error != nil {
229
+ if newIter .Error != nil && newIter . Error != io . EOF {
229
230
iter .Error = newIter .Error
230
231
}
231
232
default :
@@ -247,7 +248,7 @@ func (decoder *fuzzyFloat64Decoder) Decode(ptr unsafe.Pointer, iter *jsoniter.It
247
248
newIter := iter .Pool ().BorrowIterator ([]byte (str ))
248
249
defer iter .Pool ().ReturnIterator (newIter )
249
250
* ((* float64 )(ptr )) = newIter .ReadFloat64 ()
250
- if newIter .Error != nil {
251
+ if newIter .Error != nil && newIter . Error != io . EOF {
251
252
iter .Error = newIter .Error
252
253
}
253
254
default :
0 commit comments