From 4c814798c7bc7f6a0f92c21b027b26290622aa2f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 19 Jun 2015 19:35:42 +0000 Subject: SIZEOF replaced with more secure analog - _countof git-svn-id: http://svn.miranda-ng.org/main/trunk@14270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/FTPFileYM/src/job_generic.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/FTPFileYM/src/job_generic.cpp') diff --git a/plugins/FTPFileYM/src/job_generic.cpp b/plugins/FTPFileYM/src/job_generic.cpp index 9fa21c5a5b..5683564719 100644 --- a/plugins/FTPFileYM/src/job_generic.cpp +++ b/plugins/FTPFileYM/src/job_generic.cpp @@ -54,7 +54,7 @@ int GenericJob::openFileDialog() ofn.nFilterIndex = 1; ofn.lpstrFile = this->stzFilePath; ofn.lpstrTitle = TranslateT("FTP File - Select files"); - ofn.nMaxFile = SIZEOF(this->stzFilePath); + ofn.nMaxFile = _countof(this->stzFilePath); ofn.Flags = OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST | OFN_ALLOWMULTISELECT | OFN_EXPLORER | OFN_NOCHANGEDIR; return GetOpenFileName(&ofn); } @@ -85,7 +85,7 @@ void GenericJob::getFilesFromOpenDialog() TCHAR *ptr = this->stzFilePath + length + 1; while (ptr[0]) { - mir_sntprintf(stzFile, SIZEOF(stzFile), _T("%s\\%s"), this->stzFilePath, ptr); + mir_sntprintf(stzFile, _countof(stzFile), _T("%s\\%s"), this->stzFilePath, ptr); this->addFile(stzFile); ptr += mir_tstrlen(ptr) + 1; } @@ -113,7 +113,7 @@ int GenericJob::getFilesFromFolder(TCHAR *stzFolder) { if (!(ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) { - mir_sntprintf(stzFile, SIZEOF(stzFile), _T("%s\\%s"), stzFolder, ffd.cFileName); + mir_sntprintf(stzFile, _countof(stzFile), _T("%s\\%s"), stzFolder, ffd.cFileName); this->addFile(stzFile); } -- cgit v1.2.3