fix quick screen write to config

Change-Id: Id55f81011a9ce47589d879203ca4f8fd4c54f593
Reviewed-on: http://gerrit.rockbox.org/757
Reviewed-by: Thomas Martitz <kugel@rockbox.org>
This commit is contained in:
Dmitry Gamza 2014-02-10 17:39:12 +04:00 committed by Thomas Martitz
parent 1cf17436b7
commit a98787148a

View file

@ -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) static char* qs_write_to_cfg(void* setting, char*buf, int buf_len)
{ {
int index = *(int*)setting; int index = *(int*)setting;
if (index < 0 || index >= nb_settings - 1) if (index < 0 || index >= nb_settings)
{ {
strlcpy(buf, "-", buf_len); strlcpy(buf, "-", buf_len);
return buf; return buf;