Skip to content

Commit

Permalink
Increase MAX_STRING_SIZE (#487)
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>
  • Loading branch information
hyunseok-yang authored and dirk-thomas committed Aug 23, 2019
1 parent 2431ed6 commit d070038
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
Original file line number Diff line number Diff line change
Expand Up @@ -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 "."
Expand Down
3 changes: 1 addition & 2 deletions rcl_yaml_param_parser/test/max_string_sz.yaml
Original file line number Diff line number Diff line change
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 d070038

Please sign in to comment.