mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-10-26 13:29:53 +00:00
Fix json parsing i64::MIN, add tests for min and max i64 and u64 values
This commit is contained in:
1 parent
22024a2b71
commit
ed6777e59f
2 files changed
+25
-2
No files matched your search
@@ -167,7 +167,7 @@ impl<Iter> Deserializer<Iter>
|
||||
if pos {
|
||||
visitor.visit_u64(res)
|
||||
} else {
|
||||
let res = -(res as i64);
|
||||
let res = (res as i64).wrapping_neg();
|
||||
|
||||
// Make sure we didn't underflow.
|
||||
if res > 0 {
|
||||
|
||||
Reference in new issue
Block a user