You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit aa2cc4c
Browse filesBrowse the repository at this point in the historyBrowse files
fix: correctly parse i128::MIN from text Ion (#1016)
* fix: correctly parse `i128::MIN` from text Ion
The text Ion parser rejected `i128::MIN` (`-170141183460469231731687303715884105728`)
as out of range, even though it is a valid `i128` value. This happened because the
parser stripped the sign, parsed the magnitude as `i128`, then negated. Since the
magnitude of `i128::MIN` is `i128::MAX + 1`, parsing it as `i128` failed.
Fixed by parsing the magnitude as `u128` with proper range validation, then using
`wrapping_neg()` to correctly convert to the negative `i128` value.
Added boundary value tests for `i32`, `i64`, and `i128` min/max values.
* test: add overflow tests for `i128` boundary parsing
Add `read_ints_overflow` test to verify the parser correctly rejects
integers outside the `i128` range:
- `i128::MAX + 1` (positive overflow)
- `i128::MIN - 1` (negative overflow)
0 commit comments