mirror of
https://github.com/vivier/EMILE.git
synced 2025-08-10 20:24:58 +00:00
The number of item in list is index not index+1
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user