From ec90b021373a7f9dd02c593f656eddc2b36b5252 Mon Sep 17 00:00:00 2001 From: notaz Date: Sun, 8 Sep 2013 21:05:28 +0300 Subject: [PATCH] fix deadlock on list seek --- menu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/menu.c b/menu.c index eb728da..2e97f06 100644 --- a/menu.c +++ b/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; -- 2.39.5