main: Fix integer configuration option parse failures
authorZijun Hu <quic_zijuhu@quicinc.com>
Mon, 31 Jul 2023 09:28:42 +0000 (17:28 +0800)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 5 Jan 2024 13:34:03 +0000 (19:04 +0530)
parse_config_int() has a obvious logical error, so causes many
parse failures of integer configuration options, fixed by this
change.

src/main.c

index 7323d0648efc85cc2e799d2c60789d5e00ff1c34..a1f2edf19896545f2802dc6f8005f8189c464d3c 100755 (executable)
@@ -463,7 +463,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;
        }