diff --git a/const-oid/src/encoder.rs b/const-oid/src/encoder.rs index 0ce7058cc..77c40cc34 100644 --- a/const-oid/src/encoder.rs +++ b/const-oid/src/encoder.rs @@ -119,10 +119,10 @@ impl Encoder { /// Compute the length of an arc when encoded in base 128. const fn base128_len(arc: Arc) -> usize { match arc { - 0..=0x7f => 1, - 0x80..=0x3fff => 2, - 0x4000..=0x1fffff => 3, - 0x200000..=0x1fffffff => 4, + 0..=0x7f => 1, // up to 7 bits + 0x80..=0x3fff => 2, // up to 14 bits + 0x4000..=0x1fffff => 3, // up to 21 bits + 0x200000..=0x0fffffff => 4, // up to 28 bits _ => 5, } } diff --git a/const-oid/tests/proptests.proptest-regressions b/const-oid/tests/proptests.proptest-regressions index 805e18453..c80d61ed8 100644 --- a/const-oid/tests/proptests.proptest-regressions +++ b/const-oid/tests/proptests.proptest-regressions @@ -11,3 +11,4 @@ cc d90305406041ea5e4cf4d9e7849cad03391db1869d0b1329f60ccbf1fabaee91 # shrinks to cc 8ed8dde35d12a2c8e10cdde6d591a8f17f0cd6d6fdf90f1582536401364623bf # shrinks to s = "0.00" cc ba5e3e3dc1a64870477e82054bbf6d8272f8b0d0c9094115bf7e8b5ff59f3c63 # shrinks to s = "00.1.1" cc d211e943da9a0e3d0ee5097899b2435f784ca2b3d2f8d4790aae3744823a268a # shrinks to s = "1.1.1.60817410.1" +cc 61bdeaa6cfc6707a0c4f3e9c6165d99d28042e78acb29b0ca7f747c169e83e74 # shrinks to s = "1.1.1.270000000"