Copy-paste fix pattern
library CB-Math
fn main() {
u256 shift = CB-Math.clamp(requested_shift, 0, 255)
save one << shift
}
ClosedBit Docs
ClosedBit error docs
Shift count out of range. A bit shift used a count outside the valid 0..255 range.
A bit shift used a count outside the valid 0..255 range.
Clamp or validate the shift count before shifting.
library CB-Math
fn main() {
u256 shift = CB-Math.clamp(requested_shift, 0, 255)
save one << shift
}