-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Number fixes #1053
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
Number fixes #1053
Conversation
+1 from me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked every line in this PR. Nice. LGTM.
decoded = -Value::LargestInt(value / 10) - last_digit; | ||
} else if (value > Value::LargestUInt(Value::maxLargestInt)) { | ||
decoded = -Value::LargestInt(value / 10) * 10 - last_digit; | ||
} else if (value <= Value::LargestUInt(Value::maxLargestInt)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh! This was a bug? Good catch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just wonder the bug, is there a example code to reproduce the bug?
I think we should prioritize that over all other work. And as implies @kimsey0 says in #1062, we really should separate the old Reader tests from CharReader tests, so we can alter them independently. We are more limited in the changes we can make to old Reader. |
I think this only needs clang-format. |
@baylesj: Would you clang-format this? |
Fix conflict: which has been modified in #1084
Found out today that our jsontestrunner hasn't been testing our CharReader, only the legacy Reader. I rushed out a fix for this, as part of cleaning up the logic for parsing numbers.