The number of item in list is index not index+1

This commit is contained in:
Laurent Vivier
2007-09-11 22:57:52 +00:00
parent f934710d86
commit e12e2bb481

View File

@@ -279,8 +279,8 @@ int read_config(emile_l2_header_t* info,
}
prop_nb[index] = prop;
}
if (choice > index)
choice = index;
if (choice > index - 1)
choice = index - 1;
#if defined(USE_CLI) && defined(__LINUX__)
state = 0;
@@ -302,7 +302,7 @@ int read_config(emile_l2_header_t* info,
{
case 0: /* select entry */
list.item = title;
list.nb = index + 1;
list.nb = index;
list.current = choice;
res = emile_scrolllist(&win, &list, timeout);
choice = list.current;