diff options
Diffstat (limited to 'apps/settings.c')
-rw-r--r-- | apps/settings.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/settings.c b/apps/settings.c index 2841133957..32391a1f53 100644 --- a/apps/settings.c +++ b/apps/settings.c @@ -311,7 +311,13 @@ bool settings_load_config(const char* file, bool apply) #endif if (settings[i].cfg_vals == NULL) { - *(int*)settings[i].setting = atoi(value); + if (settings[i].flags&F_ALLOW_ARBITRARY_VALS || + (temp >= settings[i].int_setting->min && + temp <= settings[i].int_setting->max && + temp % settings[i].int_setting->step == 0)) + { + *(int*)settings[i].setting = atoi(value); + } } else { |