Workaround deliberate overflowing negation in serialize::json.
This commit is contained in:
parent
e9f892acc4
commit
5e7785cabc
@ -1540,7 +1540,7 @@ impl<T: Iterator<Item=char>> Parser<T> {
|
||||
F64Value(res)
|
||||
} else {
|
||||
if neg {
|
||||
let res = -(res as i64);
|
||||
let res = (res as i64).wrapping_neg();
|
||||
|
||||
// Make sure we didn't underflow.
|
||||
if res > 0 {
|
||||
|
Loading…
Reference in New Issue
Block a user