aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2022-12-17 09:25:48 +0000
committerDaniel Eklöf <daniel@ekloef.se>2022-12-17 10:00:05 +0000
commit4ee0b28b02a4633a4f4e6b41b9da57e41bcf9356 (patch)
treec343f45c0a1cead2686a408807a4b59259a37b2a
parentconfig: value_to_pt_or_px(): don’t allow empty px values (key=px) (diff)
config: font-size-adjustment: don’t allow empty %-values (key=%)
-rw-r--r--config.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/config.c b/config.c
index af93f419..7d849d5c 100644
--- a/config.c
+++ b/config.c
@@ -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;