Revision: 9363 https://osdn.net/projects/ttssh2/scm/svn/commits/9363 Author: zmatsuo Date: 2021-08-14 23:43:50 +0900 (Sat, 14 Aug 2021) Log Message: ----------- 変数の初期化が誤っていて警告が出ていたので修正 - memset(szFile,...) のサイズを誤っていた - r9361 - warning: 'memset' used with length equal to number of elements without multiplication by element size Revision Links: -------------- https://osdn.net/projects/ttssh2/scm/svn/commits/9361 Modified Paths: -------------- trunk/teraterm/teraterm/vtwin.cpp -------------- next part -------------- Modified: trunk/teraterm/teraterm/vtwin.cpp =================================================================== --- trunk/teraterm/teraterm/vtwin.cpp 2021-08-14 14:43:37 UTC (rev 9362) +++ trunk/teraterm/teraterm/vtwin.cpp 2021-08-14 14:43:50 UTC (rev 9363) @@ -3953,18 +3953,14 @@ // \x83\x8D\x83O\x82̍Đ\xB6 (2006.12.13 yutaka) void CVTWindow::OnReplayLog() { - OPENFILENAMEW ofn; wchar_t szFile[MAX_PATH]; const wchar_t *exec = L"ttermpro"; - wchar_t *filter; - wchar_t *title; - filter = _get_lang_msg("FILEDLG_OPEN_LOGFILE_FILTER", L"all(*.*)\\0*.*\\0\\0", ts.UILanguageFileW ); - title = _get_lang_msg("FILEDLG_OPEN_LOGFILE_TITLE", L"Select replay log file with binary mode", ts.UILanguageFileW); - // \x83o\x83C\x83i\x83\x8A\x83\x82\x81[\x83h\x82ō̎悵\x82\xBD\x83\x8D\x83O\x83t\x83@\x83C\x83\x8B\x82\xF0\x91I\x91\xF0\x82\xB7\x82\xE9 - memset(&ofn, 0, sizeof(OPENFILENAME)); - memset(szFile, 0, _countof(szFile)); + wchar_t *filter = _get_lang_msg("FILEDLG_OPEN_LOGFILE_FILTER", L"all(*.*)\\0*.*\\0\\0", ts.UILanguageFileW); + wchar_t *title = _get_lang_msg("FILEDLG_OPEN_LOGFILE_TITLE", L"Select replay log file with binary mode", ts.UILanguageFileW); + OPENFILENAMEW ofn = {}; + szFile[0] = 0; ofn.lStructSize = get_OPENFILENAME_SIZEW(); ofn.hwndOwner = HVTWin; ofn.lpstrFilter = filter;