fixed bug in indefinite length map decoding; more indefinite length map tests
diff --git a/src/qcbor_decode.c b/src/qcbor_decode.c
index 0f76963..2ec7a68 100644
--- a/src/qcbor_decode.c
+++ b/src/qcbor_decode.c
@@ -833,6 +833,10 @@
if(nReturn)
goto Done;
+ if(pDecodedItem->uDataType == QCBOR_TYPE_BREAK) {
+ goto Done;
+ }
+
// If in a map and the right decoding mode, get the label
if(DecodeNesting_TypeIsMap(&(me->nesting)) && me->uDecodeMode != QCBOR_DECODE_MODE_MAP_AS_ARRAY) {
// In a map and caller wants maps decoded, not treated as arrays