Skip to content

Commit

Permalink
Fix cast to I256 from min signed type
Browse files Browse the repository at this point in the history
  • Loading branch information
k0aki committed Sep 12, 2023
1 parent 8dddd21 commit f214570
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/ir/src/bigint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ macro_rules! impl_from {
} else if val == <$ty>::MIN {
Self {
is_negative: true,
abs: U256::one() << std::mem::size_of::<$ty>() * 8,
abs: U256::one() << std::mem::size_of::<$ty>() * 8 - 1,
}
} else {
Self {
Expand Down

0 comments on commit f214570

Please sign in to comment.