From d07003847b1a87ad0542a96c22b174967a0a7615 Mon Sep 17 00:00:00 2001 From: hyunseok-yang Date: Sat, 24 Aug 2019 06:52:46 +0900 Subject: [PATCH] Increase MAX_STRING_SIZE (#487) * Increase MAX_STRING_SIZE It's too short for string length. It occurs the error when the string field in yaml files are too long.... Signed-off-by: Hyunseok Yang * update test to match increased limit Signed-off-by: Dirk Thomas --- rcl_yaml_param_parser/src/parser.c | 2 +- rcl_yaml_param_parser/test/max_string_sz.yaml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/rcl_yaml_param_parser/src/parser.c b/rcl_yaml_param_parser/src/parser.c index 3098ba5..54674a5 100644 --- a/rcl_yaml_param_parser/src/parser.c +++ b/rcl_yaml_param_parser/src/parser.c @@ -65,7 +65,7 @@ typedef struct namespace_tracker_s uint32_t num_parameter_ns; } namespace_tracker_t; -#define MAX_STRING_SIZE 128U +#define MAX_STRING_SIZE 256U #define PARAMS_KEY "ros__parameters" #define NODE_NS_SEPERATOR "/" #define PARAMETER_NS_SEPERATOR "." diff --git a/rcl_yaml_param_parser/test/max_string_sz.yaml b/rcl_yaml_param_parser/test/max_string_sz.yaml index 1b279f6..386f7be 100644 --- a/rcl_yaml_param_parser/test/max_string_sz.yaml +++ b/rcl_yaml_param_parser/test/max_string_sz.yaml @@ -5,5 +5,4 @@ lidar_ns: lidar_1: ros__parameters: id: 10 - name: "A very long name that will not be supported by the yaml parser. The max supported string size is 128 - characters. Anything over the max size will be rejected" + name: "A long string that will not be supported by the yaml parser. The maximum supported length is 256 characters. Anything over that limit will be rejected and therefore this message has to be a bit longer in order to exceed that threshold by just one character."