From 446d8ada5790e5ca2cdc359eafa4bf7136b43ac5 Mon Sep 17 00:00:00 2001 From: Zijun Hu Date: Mon, 31 Jul 2023 17:28:42 +0800 Subject: [PATCH] main: Fix integer configuration option parse failures parse_config_int() has a obvious logical error, so causes many parse failures of integer configuration options, fixed by this change. --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 150a5af4c..13501440b 100644 --- a/src/main.c +++ b/src/main.c @@ -458,7 +458,7 @@ static bool parse_config_int(GKeyFile *config, const char *group, return false; } - if (tmp < max) { + if (tmp > max) { warn("%s.%s = %d is out of range (> %d)", group, key, tmp, max); return false; } -- 2.47.3