Closed austinabell closed 2 months ago
when trying to print a decimal with a very large negative scale and abs value of the integer length overflow usize::MAX, the print will panic.
usize::MAX
Repro:
let a = BigDecimal::new(bigdecimal::num_bigint::BigInt::from(1), i64::MIN); println!("{:?}", a);
The line I'm inferring is the issue here is https://github.com/akubera/bigdecimal-rs/blob/272123eddc02aad5d1a331ded8eb6605ed2bea96/src/lib.rs#L1566 (could be wrong, didn't verify)
This was fixed in v0.4.3, and added to the test suite in the impl_fmt::test::fmt_boundaries test module
impl_fmt::test::fmt_boundaries
Thanks for the report; sorry for being quiet.
when trying to print a decimal with a very large negative scale and abs value of the integer length overflow
usize::MAX
, the print will panic.Repro:
The line I'm inferring is the issue here is https://github.com/akubera/bigdecimal-rs/blob/272123eddc02aad5d1a331ded8eb6605ed2bea96/src/lib.rs#L1566 (could be wrong, didn't verify)