mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-28 14:57:56 +00:00
Fix json parsing i64::MIN, add tests for min and max i64 and u64 values
This commit is contained in:
@@ -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