mirror of
https://github.com/DaveGamble/cJSON.git
synced 2024-12-25 20:30:50 +08:00
Wrong counter increment
This commit is contained in:
parent
9d1b229086
commit
12c4bf1986
2
cJSON.c
2
cJSON.c
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user