diff options
author | Nicolas Badoux <n.badoux@hotmail.com> | 2024-08-30 15:09:28 +0200 |
---|---|---|
committer | Alan Wang <wp_scut@163.com> | 2024-09-23 19:08:58 +0800 |
commit | 12c4bf1986c288950a3d06da757109a6aa1ece38 (patch) | |
tree | 238c7dbe568bf0a989fabf8858297e0ed64cc329 | |
parent | 9d1b229086a7b069fb5f4e3be0226a22480a6707 (diff) | |
download | cjson-12c4bf1986c288950a3d06da757109a6aa1ece38.tar.gz cjson-12c4bf1986c288950a3d06da757109a6aa1ece38.zip |
-rw-r--r-- | cJSON.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |