Skip to content

Commit e4e7c3d

Browse files
committed
In cbor2cjson.c example, add missing cbor_move to cbor_array_get call
1 parent 34cf74b commit e4e7c3d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/cbor2cjson.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ cJSON* cbor_to_cjson(cbor_item_t* item) {
4141
case CBOR_TYPE_ARRAY: {
4242
cJSON* result = cJSON_CreateArray();
4343
for (size_t i = 0; i < cbor_array_size(item); i++) {
44-
cJSON_AddItemToArray(result, cbor_to_cjson(cbor_array_get(item, i)));
44+
cJSON_AddItemToArray(result, cbor_to_cjson(cbor_move(cbor_array_get(item, i))));
4545
}
4646
return result;
4747
}

0 commit comments

Comments
 (0)