From 2d83bf905a8da36a03d02ec83847741d553a7289 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Mon, 18 Apr 2022 00:09:07 +0200 Subject: Fix episode update in ElvSelectRecent. --- c/episodelistview.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'c') diff --git a/c/episodelistview.c b/c/episodelistview.c index 464313f..1afee3e 100644 --- a/c/episodelistview.c +++ b/c/episodelistview.c @@ -167,9 +167,8 @@ ElvSelectRecent() i = 0; lvfi.flags = LVFI_PARAM; lvfi.lParam = iEpisode; - do - lvfi.lParam = iEpisode+i; - while ((iItem = ListView_FindItem(HElv, -1, &lvfi)) == -1 && i++ < 100); + while ((iItem = ListView_FindItem(HElv, -1, &lvfi)) == -1 && i++ < 100) + lvfi.lParam = ++iEpisode; if (iItem == -1) return; s: ListView_SetItemState(HElv, -1, LVIF_STATE, LVIS_SELECTED); -- cgit v1.2.3