diff --git a/cJSON.c b/cJSON.c index ace15f8..2c3cccc 100644 --- a/cJSON.c +++ b/cJSON.c @@ -1602,11 +1602,6 @@ static cJSON_bool print_array(const cJSON * const item, printbuffer * const outp return false; } - if (output_buffer->depth >= CJSON_NESTING_LIMIT) - { - return false; /* nesting is too deep */ - } - /* Compose the output array. */ /* opening square bracket */ output_pointer = ensure(output_buffer, 1); @@ -1787,11 +1782,6 @@ static cJSON_bool print_object(const cJSON * const item, printbuffer * const out return false; } - if (output_buffer->depth >= CJSON_NESTING_LIMIT) - { - return false; /* nesting is too deep */ - } - /* Compose the output: */ length = (size_t) (output_buffer->format ? 2 : 1); /* fmt: {\n */ output_pointer = ensure(output_buffer, length + 1);