NordicSemiconductor / zcbor

Low footprint C/C++ CBOR library and Python tool providing code generation from CDDL descriptions.
Apache License 2.0
105 stars 34 forks source link

zcbor.py: Fix a bug where some decoding function were not called #405

Closed oyvindronningstad closed 4 months ago

oyvindronningstad commented 4 months ago

This is a bug in the union_int optimization. In maps, the optimization refers to the key, but was propagated to the value as well, so that in some cases, if the key was optimized away, the value was erroneously optimized away as well.

Thanks to Pete Johanson for finding and debugging this issue!

Fixes #398