diff --git a/src/de.rs b/src/de.rs index 7cc9f9b8e..a2f34b908 100644 --- a/src/de.rs +++ b/src/de.rs @@ -434,8 +434,8 @@ impl<'de, R: Read<'de>> Deserializer { } else { let neg = (significand as i64).wrapping_neg(); - // Convert into a float if we underflow. - if neg > 0 { + // Convert into a float if we underflow, or on `-0`. + if neg >= 0 { ParserNumber::F64(-(significand as f64)) } else { ParserNumber::I64(neg)