File tree 1 file changed +7
-7
lines changed
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -105,14 +105,14 @@ CBORMessageDecoder::ArrayParserState CBORMessageDecoder::handle_EnterArray(CborV
105
105
106
106
CBORMessageDecoder::ArrayParserState CBORMessageDecoder::handle_LeaveArray (CborValue * main_iter, CborValue * array_iter) {
107
107
// Advance to the next parameter (the last one in the array)
108
- if (cbor_value_advance (array_iter) != CborNoError) {
109
- return ArrayParserState::Error;
110
- }
111
- // Leave the array
112
- if (cbor_value_leave_container (main_iter, array_iter) != CborNoError) {
113
- return ArrayParserState::Error;
108
+ if (cbor_value_advance (array_iter) == CborNoError) {
109
+ // Leave the array
110
+ if (cbor_value_leave_container (main_iter, array_iter) == CborNoError) {
111
+ return ArrayParserState::Complete;
112
+ }
114
113
}
115
- return ArrayParserState::Complete;
114
+
115
+ return ArrayParserState::Error;
116
116
}
117
117
118
118
/* *****************************************************************************
You can’t perform that action at this time.
0 commit comments