1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
diff --git a/apps/settings.c b/apps/settings.c
index 98cd6eb..898d9f2 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -298,14 +298,19 @@ bool settings_load_config(const char* file, bool apply)
                         }
                         else
                         {
-                            int temp, *v = (int*)settings[i].setting;
-                            bool found = cfg_string_to_int(i, &temp, value);
-                            if (found)
+                            int *v = (int*)settings[i].setting;
+                            if (settings[i].flags & F_CHOICE_SETTING)
                             {
-                                if (settings[i].flags&F_TABLE_SETTING)
-                                    *v = settings[i].table_setting->values[temp];
-                                else
-                                    *v = temp;
+                                int temp;
+                                if (cfg_string_to_int(i, &temp, value))
+                                {   /* valid setting found */
+                                    if (settings[i].flags&F_TABLE_SETTING)
+                                        *v = settings[i].table_setting->values[temp];
+                                    else
+                                        *v = temp;
+                                }
+                                /* else ignore and don't change
+                                 * the current value */
                             }
                             else
                                 *v = atoi(value);