From 4ee0b28b02a4633a4f4e6b41b9da57e41bcf9356 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sat, 17 Dec 2022 10:25:48 +0100 Subject: [PATCH] =?UTF-8?q?config:=20font-size-adjustment:=20don=E2=80=99t?= =?UTF-8?q?=20allow=20empty=20%-values=20(key=3D%)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;