Skip to content

Commit

Permalink
Enum length-check fixes + Enum optional field support (#217)
Browse files Browse the repository at this point in the history
* Enum length-check fixes + Enum optional field support

Fixes #175

Now properly checks all lengths for all variants to ensure that
overlapping types parse the correct variant instead of prematurely
thinking it's a subset of one.

Also fixes having CBORReadLen contributions from previous variants that
tried to parse from contributing to later variant parses (possibly
causing issues if it meant it already hit the limit).

Includes support for optional fields within enums that get inlined.

Tests for both cases.

* preserve-encodings tests for overlapping_inlined + enum_opt_embed_fields
  • Loading branch information
rooooooooob authored Dec 15, 2023
1 parent 45071ae commit e3ba977
Show file tree
Hide file tree
Showing 6 changed files with 510 additions and 89 deletions.
Loading

0 comments on commit e3ba977

Please sign in to comment.