include actual size in error message (#490)
* include actual size in error message Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com> * use %u for existing arguments Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
This commit is contained in:
parent
41792cb6e8
commit
b66395dc57
1 changed files with 2 additions and 1 deletions
|
@ -936,7 +936,8 @@ static rcutils_ret_t parse_value(
|
||||||
|
|
||||||
if (val_size > MAX_STRING_SIZE) {
|
if (val_size > MAX_STRING_SIZE) {
|
||||||
RCUTILS_SET_ERROR_MSG_WITH_FORMAT_STRING(
|
RCUTILS_SET_ERROR_MSG_WITH_FORMAT_STRING(
|
||||||
"Scalar value at line %d is bigger than %d bytes", line_num, MAX_STRING_SIZE);
|
"Scalar value at line %u has %zu bytes which is bigger than the compile "
|
||||||
|
"time limit of %u bytes", line_num, val_size, MAX_STRING_SIZE);
|
||||||
return RCUTILS_RET_ERROR;
|
return RCUTILS_RET_ERROR;
|
||||||
} else {
|
} else {
|
||||||
if (style != YAML_SINGLE_QUOTED_SCALAR_STYLE &&
|
if (style != YAML_SINGLE_QUOTED_SCALAR_STYLE &&
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue