Workaround deliberate overflowing negation in serialize::json.
This commit is contained in:
parent
e9f892acc4
commit
5e7785cabc
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue