Fix the sea of red introduced in bf546fb
Change-Id: Ic158771d8dae6b587e0f567e7a6bb005b5e2ac50
This commit is contained in:
parent
bf546fbfcb
commit
25f9601d7b
1 changed files with 2 additions and 1 deletions
|
@ -311,12 +311,13 @@ bool settings_load_config(const char* file, bool apply)
|
||||||
#endif
|
#endif
|
||||||
if (settings[i].cfg_vals == NULL)
|
if (settings[i].cfg_vals == NULL)
|
||||||
{
|
{
|
||||||
|
int temp = atoi(value);
|
||||||
if (settings[i].flags&F_ALLOW_ARBITRARY_VALS ||
|
if (settings[i].flags&F_ALLOW_ARBITRARY_VALS ||
|
||||||
(temp >= settings[i].int_setting->min &&
|
(temp >= settings[i].int_setting->min &&
|
||||||
temp <= settings[i].int_setting->max &&
|
temp <= settings[i].int_setting->max &&
|
||||||
temp % settings[i].int_setting->step == 0))
|
temp % settings[i].int_setting->step == 0))
|
||||||
{
|
{
|
||||||
*(int*)settings[i].setting = atoi(value);
|
*(int*)settings[i].setting = temp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue