diff --git a/include/fc/config.hpp b/include/fc/config.hpp index 08aa31a..8e64a1d 100644 --- a/include/fc/config.hpp +++ b/include/fc/config.hpp @@ -3,6 +3,11 @@ #define FC_PACK_MAX_DEPTH 1000 #endif +#ifndef FC_MAX_STRING_OBJECT_DEPTH + // how many levels of nested objects are proceed for string functions +#define FC_MAX_STRING_OBJECT_DEPTH 200 +#endif + #ifndef FC_MAX_LOG_OBJECT_DEPTH // how many levels of nested objects are displayed in log messages #define FC_MAX_LOG_OBJECT_DEPTH 1000 diff --git a/include/fc/string.hpp b/include/fc/string.hpp index 13e10da..2fce7b0 100755 --- a/include/fc/string.hpp +++ b/include/fc/string.hpp @@ -2,6 +2,7 @@ #include #include #include +#include #ifndef USE_FC_STRING #include @@ -25,7 +26,7 @@ namespace fc typedef fc::optional ostring; class variant_object; - fc::string format_string( const fc::string&, const variant_object&, uint32_t max_object_depth = 200 ); + fc::string format_string( const fc::string&, const variant_object&, uint32_t max_object_depth = FC_MAX_STRING_OBJECT_DEPTH ); fc::string trim( const fc::string& ); fc::string to_lower( const fc::string& ); string trim_and_normalize_spaces( const string& s );