Skip to content

Commit d41efa2

Browse files
authored
fix(cast): correct max_int boundary check for uint255 (foundry-rs#13568)
1 parent bcadd24 commit d41efa2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

crates/cast/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1158,7 +1158,7 @@ impl SimpleCast {
11581158
DynSolType::Uint(n) => {
11591159
if MAX {
11601160
let mut max = U256::MAX;
1161-
if n < 255 {
1161+
if n < 256 {
11621162
max &= U256::from(1).wrapping_shl(n).wrapping_sub(U256::from(1));
11631163
}
11641164
Ok(max.to_string())

0 commit comments

Comments
 (0)