aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2022-12-17 09:25:16 +0000
committerDaniel Eklöf <daniel@ekloef.se>2022-12-17 10:00:05 +0000
commit7bf150c11a6d3b8145b7a3d8b7d0ae2349e0c094 (patch)
tree1724e9b2657a47b874110ca2532c2048fc6bb32e
parentfoot.ini: add font-size-adjustment (diff)
config: value_to_pt_or_px(): don’t allow empty px values (key=px)
-rw-r--r--config.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/config.c b/config.c
index b10f42b2..af93f419 100644
--- a/config.c
+++ b/config.c
@@ -651,7 +651,7 @@ value_to_pt_or_px(struct context *ctx, struct pt_or_px *res)
char *end = NULL;
long value = strtol(s, &end, 10);
- if (!(errno == 0 && end == s + len - 2)) {
+ if (!(len > 2 && errno == 0 && end == s + len - 2)) {
LOG_CONTEXTUAL_ERR("invalid px value (must be in the form 12px)");
return false;
}