mirror of
https://github.com/RaySollium99/libpicofe.git
synced 2025-09-04 22:47:44 -04:00
fix off-by-1 in directory listing search
This commit is contained in:
parent
bededcb4be
commit
f5b32cc30c
1 changed files with 1 additions and 2 deletions
3
menu.c
3
menu.c
|
@ -981,7 +981,6 @@ static int dirent_seek_char(struct dirent **namelist, int len, int sel, char c)
|
|||
{
|
||||
int i;
|
||||
|
||||
sel++;
|
||||
for (i = sel + 1; ; i++) {
|
||||
if (i >= len)
|
||||
i = 1;
|
||||
|
@ -992,7 +991,7 @@ static int dirent_seek_char(struct dirent **namelist, int len, int sel, char c)
|
|||
break;
|
||||
}
|
||||
|
||||
return i - 1;
|
||||
return i;
|
||||
}
|
||||
|
||||
static const char *menu_loop_romsel(char *curr_path, int len,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue