From 0c27111260a2275230121af982db67cee8477528 Mon Sep 17 00:00:00 2001 From: Quantum Date: Sat, 28 Aug 2021 06:04:46 -0400 Subject: [PATCH] [common] option: return NAN when float option doesn't exist false is not a float value. --- common/src/option.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/src/option.c b/common/src/option.c index 2144e98b..8cd9065a 100644 --- a/common/src/option.c +++ b/common/src/option.c @@ -23,6 +23,7 @@ #include "common/stringutils.h" #include +#include #include #include #include @@ -799,7 +800,7 @@ float option_get_float(const char * module, const char * name) if (!o) { DEBUG_ERROR("BUG: Failed to get the value for option %s:%s", module, name); - return false; + return NAN; } DEBUG_ASSERT(o->type == OPTION_TYPE_FLOAT); return o->value.x_float;