laurencelundblade / QCBOR

Comprehensive, powerful, commercial-quality CBOR encoder/ decoder that is still suited for small devices.
Other
181 stars 47 forks source link

Fix LastTag; optimize spiffy error handling #240

Closed laurencelundblade closed 2 months ago

laurencelundblade commented 2 months ago

QCBORDecode_GetNthTagOfLast() now works correctly for all spiffy decode and similar decode operations. Before it was not filling in the tag values for some operations. Better test coverage.

Some refactoring and code size reduction for spiffy decode functions like QCBORDecode_GetBool().

QCBORDecode_GetItemInMapN() and QCBORDecode_GetItemInMapSZ() set the label and data types to QCBOR_TYPE_NONE when the decode is in error.

Minor internal restructure of QCBORDecode_Private_ExpMantissa(). Error codes from it will be more accurate.

Adresses #113