diff options
-rw-r--r-- | c/episodelistview.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/c/episodelistview.c b/c/episodelistview.c index 780633c..1113b47 100644 --- a/c/episodelistview.c +++ b/c/episodelistview.c @@ -183,7 +183,8 @@ ElvUpdate() lviSelected.mask = LVIF_PARAM; lviSelected.iItem = -1; while ((lviSelected.iItem = ListView_GetNextItem( - HElv, lviSelected.iItem, LVNI_SELECTED)) != -1) { + HElv, lviSelected.iItem, LVNI_SELECTED)) != -1 + && i < 2048) { if (!ListView_GetItem(HElv, &lviSelected)) continue; iEpisodeSelected[i++] = lviSelected.lParam; } |