Skip to content

Commit

Permalink
Increase MAX_STRING_SIZE (#487) (#503)
Browse files Browse the repository at this point in the history
* 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 <hyunseok7.yang@lge.com>

* update test to match increased limit

Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
Signed-off-by: Zachary Michaels <zmichaels11@gmail.com>
  • Loading branch information
zmichaels11 authored and dirk-thomas committed Sep 19, 2019
1 parent 477e276 commit 6aa3eb5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rcl_yaml_param_parser/src/parser.c
Expand Up @@ -62,7 +62,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 "."
Expand Down
3 changes: 1 addition & 2 deletions rcl_yaml_param_parser/test/max_string_sz.yaml
Expand Up @@ -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."

0 comments on commit 6aa3eb5

Please sign in to comment.