From 259f738c1e5de190de34867536005538adcec79f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Wed, 27 Jul 2022 19:56:35 +0200 Subject: Fix remaining memory bugs. See f7534e2. --- c/episodelistview.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'c') diff --git a/c/episodelistview.cpp b/c/episodelistview.cpp index ea14b5b..6ba97cd 100644 --- a/c/episodelistview.cpp +++ b/c/episodelistview.cpp @@ -362,7 +362,7 @@ void EpisodeListView::Update() if (!g_bViewTVOriginal) if (Pl("episode_data","tv_original",iEp)) continue; - swprintf_s(wszEpisode, sizeof(wszEpisode), L"%d", iEp); + swprintf_s(wszEpisode, sizeof(wszEpisode)/sizeof(*wszEpisode), L"%d", iEp); /* Insert item. */ lviEpisode.iItem = cItem++; @@ -420,7 +420,7 @@ void EpisodeListView::Update() /* Show number of displayed items in status bar. */ extern HWND g_hWndStatus; wchar_t wszDisp[16]; - swprintf_s(wszDisp, sizeof(wszDisp), L"%d", cItem); + swprintf_s(wszDisp, sizeof(wszDisp)/sizeof(*wszDisp), L"%d", cItem); SendMessage(g_hWndStatus, SB_SETTEXT, MAKEWPARAM(1,0), (LPARAM)wszDisp); SendMessage(hWnd, WM_SETREDRAW, TRUE, 0); -- cgit v1.2.3