The _value_match_exact call decrements the nanocbor_value_t::remaining member when it decodes an indefinite array or map. This should not happen. This PR adds const to the outer nanocbor_value_t argument of the enter container functions and makes sure that they are not modified in the functions.
This should fix the issue described in #52 and #53.
A test to ensure to test the (non-)indefinite maps/arrays in a mixed scenario is added.
The
_value_match_exact
call decrements thenanocbor_value_t::remaining
member when it decodes an indefinite array or map. This should not happen. This PR addsconst
to the outernanocbor_value_t
argument of the enter container functions and makes sure that they are not modified in the functions.This should fix the issue described in #52 and #53.
A test to ensure to test the (non-)indefinite maps/arrays in a mixed scenario is added.