summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-07-20 22:38:37 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-07-20 22:39:01 -0400
commit25f9601d7bd6f98110e646d7d2b769d26b46bfca (patch)
treebc8153ce3bb05a2d552f688bd1463e26d00f94bc
parentbf546fbfcbf87f7ce44a36f8696ff5acd15f6817 (diff)
downloadrockbox-25f9601.tar.gz
rockbox-25f9601.tar.bz2
rockbox-25f9601.zip
Fix the sea of red introduced in bf546fb
Change-Id: Ic158771d8dae6b587e0f567e7a6bb005b5e2ac50
-rw-r--r--apps/settings.c3
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)
#endif
if (settings[i].cfg_vals == NULL)
{
+ int temp = 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);
+ *(int*)settings[i].setting = temp;
}
}
else