mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
config: font-size-adjustment: don’t allow empty %-values (key=%)
This commit is contained in:
parent
7bf150c11a
commit
4ee0b28b02
1 changed files with 1 additions and 1 deletions
2
config.c
2
config.c
|
|
@ -932,7 +932,7 @@ parse_section_main(struct context *ctx)
|
||||||
char *end = NULL;
|
char *end = NULL;
|
||||||
|
|
||||||
float percent = strtof(ctx->value, &end);
|
float percent = strtof(ctx->value, &end);
|
||||||
if (!(errno == 0 && end == ctx->value + len - 1)) {
|
if (!(len > 1 && errno == 0 && end == ctx->value + len - 1)) {
|
||||||
LOG_CONTEXTUAL_ERR(
|
LOG_CONTEXTUAL_ERR(
|
||||||
"invalid percent value (must be in the form 10.5%%)");
|
"invalid percent value (must be in the form 10.5%%)");
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue