Parsing Decimal With Negative Exponent And Zero Scale Can Overflow
Open
bug
- Dominant language
- Rust
- Stars
- 3.6k
- Forks
- 1.3k
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 167
Description
**Describe the bug**
This passes as expected
```
let v = parse_decimal::("99999999999999999999999999999999999999", 38, 0).unwrap();
assert_eq!(v, 99999999999999999999999999999999999999);
```
But if we add an additional `9` followed by `e-1` we get overflow
```
let v = parse_decimal::("999999999999999999999999999999999999999e-1", 38, 0).unwrap();
assert_eq!(v, 99999999999999999999999999999999999999);
```
**To Reproduce**
**Expected behavior**
**Additional context**
Contributor guide
Assessment
This issue has not been assessed yet.