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

Deserializing std::i*::MIN integer fails #158

Closed
qthree opened this issue Apr 14, 2019 · 0 comments · Fixed by #161
Closed

Deserializing std::i*::MIN integer fails #158

qthree opened this issue Apr 14, 2019 · 0 comments · Fixed by #161
Labels

Comments

@qthree
Copy link

qthree commented Apr 14, 2019

RON can serialize std::i32::MIN but fails to deserialize it.
That's because it's trying to parse -2147483648i32 as 2147483648i32 using i32::from_str_radix and then negate it. But i32::from_str_radix fails because std::i32::MAX is 2147483647.
Haven't checked, but most probably there is same problem with i8::MIN, i16::MIN, i64::MIN and isize::MIN.

@torkleyy torkleyy added the bug label Apr 14, 2019
torkleyy added a commit to torkleyy/ron that referenced this issue Apr 18, 2019
bors bot added a commit that referenced this issue May 26, 2019
161: Parse integers ourselves, fix MIN parsing r=torkleyy a=torkleyy

Fixes #158

Co-authored-by: Thomas Schaller <torkleyy@gmail.com>
bors bot added a commit that referenced this issue May 26, 2019
161: Parse integers ourselves, fix MIN parsing r=torkleyy a=torkleyy

Fixes #158

Co-authored-by: Thomas Schaller <torkleyy@gmail.com>
@bors bors bot closed this as completed in #161 May 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants