From a98787148a694f9474a6d2b5ba103d4fbef6b91f Mon Sep 17 00:00:00 2001 From: Dmitry Gamza Date: Mon, 10 Feb 2014 17:39:12 +0400 Subject: [PATCH] fix quick screen write to config Change-Id: Id55f81011a9ce47589d879203ca4f8fd4c54f593 Reviewed-on: http://gerrit.rockbox.org/757 Reviewed-by: Thomas Martitz --- apps/settings_list.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;