diff --git a/const-oid/src/encoder.rs b/const-oid/src/encoder.rs index 049e60ab2..e4e8a4bff 100644 --- a/const-oid/src/encoder.rs +++ b/const-oid/src/encoder.rs @@ -80,7 +80,7 @@ impl Encoder { let nbytes = base128_len(arc); // Shouldn't overflow on any 16-bit+ architectures - if self.cursor + nbytes + 1 >= ObjectIdentifier::MAX_SIZE { + if self.cursor + nbytes + 1 > MAX_SIZE { return Err(Error::Length); }