Fix recursion counter check. Add control to override depth of nested … (#4953)

* Fix recursion counter check. Add control to override depth of nested objects.

* Change if-condition to `>=`
This commit is contained in:
Vladimir Glavnyy
2018-10-04 23:27:37 +07:00
committed by Wouter van Oortmerssen
parent c0698cc33f
commit 925c1d77fc
5 changed files with 38 additions and 5 deletions

View File

@@ -23,6 +23,12 @@ if(NOT FLATBUFFERS_BUILD_FLATC AND FLATBUFFERS_BUILD_TESTS)
set(FLATBUFFERS_BUILD_TESTS OFF)
endif()
if(DEFINED FLATBUFFERS_MAX_PARSING_DEPTH)
# Override the default recursion depth limit.
add_definitions(-DFLATBUFFERS_MAX_PARSING_DEPTH=${FLATBUFFERS_MAX_PARSING_DEPTH})
message(STATUS "FLATBUFFERS_MAX_PARSING_DEPTH: ${FLATBUFFERS_MAX_PARSING_DEPTH}")
endif()
set(FlatBuffers_Library_SRCS
include/flatbuffers/code_generators.h
include/flatbuffers/base.h