Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jsoniter: Fix errors during reading integers from chunked io.Reader #477

Merged

Commits on Aug 5, 2020

  1. jsoniter: Fix errors during reading integers from chunked io.Reader

    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 json-iterator#476
    mrVanboy committed Aug 5, 2020
    Copy the full SHA
    cd30fdf View commit details
    Browse the repository at this point in the history