Skip to content

Commit

Permalink
Wrong counter increment
Browse files Browse the repository at this point in the history
  • Loading branch information
vwvw authored and Alanscut committed Sep 23, 2024
1 parent 9d1b229 commit 12c4bf1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cJSON.c
Original file line number Diff line number Diff line change
Expand Up @@ -2794,7 +2794,7 @@ cJSON * cJSON_Duplicate_rec(const cJSON *item, size_t depth, cJSON_bool recurse)
if(depth >= CJSON_CIRCULAR_LIMIT) {
goto fail;
}
newchild = cJSON_Duplicate_rec(child, ++depth, true); /* Duplicate (with recurse) each item in the ->next chain */
newchild = cJSON_Duplicate_rec(child, depth + 1, true); /* Duplicate (with recurse) each item in the ->next chain */
if (!newchild)
{
goto fail;
Expand Down

0 comments on commit 12c4bf1

Please # to comment.