mirror of
https://github.com/RaySollium99/libpicofe.git
synced 2025-09-07 07:38:04 -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;
|
int i;
|
||||||
|
|
||||||
sel++;
|
|
||||||
for (i = sel + 1; ; i++) {
|
for (i = sel + 1; ; i++) {
|
||||||
if (i >= len)
|
if (i >= len)
|
||||||
i = 1;
|
i = 1;
|
||||||
|
@ -992,7 +991,7 @@ static int dirent_seek_char(struct dirent **namelist, int len, int sel, char c)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return i - 1;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *menu_loop_romsel(char *curr_path, int len,
|
static const char *menu_loop_romsel(char *curr_path, int len,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue