anweiss / cddl

Concise data definition language (RFC 8610) implementation and JSON and CBOR validator in Rust
https://cddl.anweiss.tech
MIT License
91 stars 13 forks source link

Upper-bound-exclusive ranges erroneously exclude the lower bound #226

Open Limeth opened 4 months ago

Limeth commented 4 months ago

Citing the spec,

A range can be inclusive of both bounds given (denoted by joining two values by ".."), or it can include the lower bound and exclude the upper bound (denoted by instead using "...").

However, it seems that this library treats "..." ranges as exclusive-exclusive rather than inclusive-exclusive.