diff options
Diffstat (limited to 'c/episodelistview.cpp')
-rw-r--r-- | c/episodelistview.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/c/episodelistview.cpp b/c/episodelistview.cpp index 645c11f..cadd751 100644 --- a/c/episodelistview.cpp +++ b/c/episodelistview.cpp @@ -281,7 +281,9 @@ void EpisodeListView::SelectUnwatched(int dir) iEpNew = lvfi.lParam; for (;;) { iEpNew += dir; - if (iEpNew == 0 || iEpNew == g_cfg.cEp || !g_fvElv[iEpNew-1].siEp[0]) + if (iEpNew == 0 + || static_cast<size_t>(iEpNew) > g_fvElv.c + || !g_fvElv[iEpNew-1].siEp[0]) return; if (!g_fvElv[iEpNew-1].bWatched) break; @@ -421,10 +423,9 @@ void EpisodeListView::Update() } /* Show number of displayed items in status bar. */ - extern HWND g_hWndStatus; wchar_t disp[16]; Swprintf(disp, L"%d", cItem); - SendMessage(g_hWndStatus, SB_SETTEXT, MAKEWPARAM(1,0), reinterpret_cast<LPARAM>(disp)); + Status(disp, 1); } Sort(); |