diff --git a/const-oid/src/encoder.rs b/const-oid/src/encoder.rs index c901e492a..3edbbf6aa 100644 --- a/const-oid/src/encoder.rs +++ b/const-oid/src/encoder.rs @@ -132,7 +132,7 @@ const fn base128_byte(arc: Arc, pos: usize, total: usize) -> Result { debug_assert!(pos < total); let last_byte = checked_add!(pos, 1) == total; let mask = if last_byte { 0 } else { 0b10000000 }; - let shift = checked_sub!(checked_sub!(total, pos), 1) * 7; + let shift = checked_mul!(checked_sub!(checked_sub!(total, pos), 1), 7); Ok(((arc >> shift) & 0b1111111) as u8 | mask) }