config: font-size-adjustment: don’t allow empty %-values (key=%)

This commit is contained in:
Daniel Eklöf 2022-12-17 10:25:48 +01:00
parent 7bf150c11a
commit 4ee0b28b02
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -932,7 +932,7 @@ parse_section_main(struct context *ctx)
char *end = NULL;
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(
"invalid percent value (must be in the form 10.5%%)");
return false;