1
0
mirror of https://github.com/json-iterator/go.git synced 2025-04-20 11:28:49 +02:00
Ivan Boyarkin 6821bec9fa
jsoniter: Fix errors during reading integers from chunked io.Reader (#477)
This commit fixes bug in Iterator.assertInteger method if the next
conditions are met:
- Iterator reads data from `io.Reader`,
- expected value is `0` (zero)
- `Iterator.tail == Iterator.head + 1`
- `Iterator.tail < len(Iterator.buf)`
- value in the buffer after `Iterator.tail` is presented from the previous read and has '.' character.

Typical error which user cal see is:
- assertInteger: can not decode float as int, error found in #X byte of ...

Regression test added for checking the correct behaviour.

Fixes #476
2020-08-06 09:14:08 +08:00
..
2018-02-24 22:04:41 +08:00
2018-02-24 22:04:41 +08:00
2019-10-08 11:17:01 -04:00
2018-02-24 22:04:41 +08:00
2020-01-16 17:17:18 +08:00
2020-07-21 17:07:23 +08:00