diff --git a/apps/settings_list.c b/apps/settings_list.c index 1ef9c62bf0..648cb420cf 100644 --- a/apps/settings_list.c +++ b/apps/settings_list.c @@ -568,7 +568,7 @@ static void qs_load_from_cfg(void* var, char*value) static char* qs_write_to_cfg(void* setting, char*buf, int buf_len) { int index = *(int*)setting; - if (index < 0 || index >= nb_settings - 1) + if (index < 0 || index >= nb_settings) { strlcpy(buf, "-", buf_len); return buf;