mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-25 06:47:19 +00:00
[common] option: return NAN when float option doesn't exist
false is not a float value.
This commit is contained in:
parent
5225d2e97f
commit
0c27111260
@ -23,6 +23,7 @@
|
||||
#include "common/stringutils.h"
|
||||
|
||||
#include <ctype.h>
|
||||
#include <math.h>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user