-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
Bug in overflow detection when parsing integers #380
Comments
nlohmann
added a commit
that referenced
this issue
Dec 13, 2016
🔀 fix issue #380: Signed integer overflow check
nlohmann
added a commit
that referenced
this issue
Dec 13, 2016
Merged #390. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
temp < value
above will not detect overflow for some values, as we're not just adding a small value, but also multiplying by 10, so this may overflow couple of times over and end-up satisfyingtemp >= value
. As fortemp > max
- it looks to me that it will never happen unless the width oftemp
is greater than that ofmax
Try round-tripping 166020696663385964490
The text was updated successfully, but these errors were encountered: