aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;