From 62e7e910aa79b9f9529ed4cb71be9a0f863978a5 Mon Sep 17 00:00:00 2001 From: Valiantsin Dzerakh Date: Sun, 1 Nov 2026 11:28:53 +0300 Subject: [PATCH] Read fractional range ends in the probe's default check probe-cfg parsed the ends of a min..max range with strtol, so walk_scale's 0.2..0.9 became 0..0 and its default 0.51 failed the check. Co-Authored-By: Claude Opus 5.5 --- runtime/cfg_probe.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/runtime/cfg_probe.c b/runtime/cfg_probe.c index 9bf76bb2..0473ce5a 100644 --- a/runtime/cfg_probe.c +++ b/runtime/cfg_probe.c @@ -424,9 +424,10 @@ int probe_cfg(void) { int ok = 0; if (!m->values) ok = 1; else if (strstr(m->values, "..")) { - long lo = strtol(m->values, NULL, 10), hi = strtol(strstr(m->values, "..") + 2, NULL, 10); + // strtod: ranges such as 0.2..0.9 have fractional ends + double lo = strtod(m->values, NULL), hi = strtod(strstr(m->values, "..") + 2, NULL); double d = strtod(m->def, NULL); - ok = d >= (double)lo && d <= (double)hi; + ok = d >= lo && d <= hi; } else { size_t dl = strlen(m->def); for (const char *v = m->values; *v;) {