diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/settings.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/settings.c b/apps/settings.c index 32391a1f53..ec8382b8a8 100644 --- a/apps/settings.c +++ b/apps/settings.c | |||
@@ -311,12 +311,13 @@ bool settings_load_config(const char* file, bool apply) | |||
311 | #endif | 311 | #endif |
312 | if (settings[i].cfg_vals == NULL) | 312 | if (settings[i].cfg_vals == NULL) |
313 | { | 313 | { |
314 | int temp = atoi(value); | ||
314 | if (settings[i].flags&F_ALLOW_ARBITRARY_VALS || | 315 | if (settings[i].flags&F_ALLOW_ARBITRARY_VALS || |
315 | (temp >= settings[i].int_setting->min && | 316 | (temp >= settings[i].int_setting->min && |
316 | temp <= settings[i].int_setting->max && | 317 | temp <= settings[i].int_setting->max && |
317 | temp % settings[i].int_setting->step == 0)) | 318 | temp % settings[i].int_setting->step == 0)) |
318 | { | 319 | { |
319 | *(int*)settings[i].setting = atoi(value); | 320 | *(int*)settings[i].setting = temp; |
320 | } | 321 | } |
321 | } | 322 | } |
322 | else | 323 | else |