aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-07-27 19:56:35 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-07-27 19:56:35 +0200
commit259f738c1e5de190de34867536005538adcec79f (patch)
tree50559f61e0c0b156b0531b82930155192ea1956b
parent18f3ea2529365de54838b7a1a877322b3f98552d (diff)
downloadEpisodeBrowser-259f738c1e5de190de34867536005538adcec79f.tar.gz
Fix remaining memory bugs.
See f7534e2.
-rw-r--r--c/episodelistview.cpp4
1 files changed, 2 insertions, 2 deletions
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);