mirror of
https://github.com/RaySollium99/libpicofe.git
synced 2025-09-04 22:47:44 -04:00
fix deadlock on list seek
This commit is contained in:
parent
9028744c19
commit
ec90b02137
1 changed files with 3 additions and 1 deletions
4
menu.c
4
menu.c
|
@ -959,9 +959,11 @@ static int dirent_seek_char(struct dirent **namelist, int len, int sel, char c)
|
|||
int i;
|
||||
|
||||
sel++;
|
||||
for (i = sel + 1; i != sel; i++) {
|
||||
for (i = sel + 1; ; i++) {
|
||||
if (i >= len)
|
||||
i = 1;
|
||||
if (i == sel)
|
||||
break;
|
||||
|
||||
if (tolower_simple(namelist[i]->d_name[0]) == c)
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue