diff mbox series

[BlueZ,v2] main: Fix integer configuration option parse failures

Message ID 1690795722-29873-1-git-send-email-quic_zijuhu@quicinc.com
State New
Headers show
Series [BlueZ,v2] main: Fix integer configuration option parse failures | expand

Commit Message

quic_zijuhu July 31, 2023, 9:28 a.m. UTC
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 mbox series

Patch

diff --git a/src/main.c b/src/main.c
index 150a5af4cca4..13501440b052 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;
 	}