Closed aangert closed 3 months ago
When generating Code with zcbor code -c pet.cddl -d -e -t Pet --output-cmake ~/generated/pet the optional element error causes the Error
zcbor code -c pet.cddl -d -e -t Pet --output-cmake ~/generated/pet
error
AssertionError: Must be a direct call to zcbor to guarantee that payload and elem_count" are cleaned up after a failure.
If error is not optional code is generated sucessfully, and other elements can be marked as optional without throwing an error. pet.cddl:
Pet = [ name: [ +tstr ], ?error: arr, ] arr = [ dummy: uint, ]
Thanks for the report, this will be fixed.
When generating Code with
zcbor code -c pet.cddl -d -e -t Pet --output-cmake ~/generated/pet
the optional elementerror
causes the ErrorIf
error
is not optional code is generated sucessfully, and other elements can be marked as optional without throwing an error. pet.cddl: