summaryrefslogtreecommitdiff
path: root/plugins/FTPFileYM/src/job_generic.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-19 19:35:42 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-19 19:35:42 +0000
commit4c814798c7bc7f6a0f92c21b027b26290622aa2f (patch)
tree9bbfb38bd639f352300aa16ff7c45f5a9b2dba6d /plugins/FTPFileYM/src/job_generic.cpp
parentf0f0cd088f1ec3a85abee825ddbc214f3f6b92c3 (diff)
SIZEOF replaced with more secure analog - _countof
git-svn-id: http://svn.miranda-ng.org/main/trunk@14270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/FTPFileYM/src/job_generic.cpp')
-rw-r--r--plugins/FTPFileYM/src/job_generic.cpp6
1 files changed, 3 insertions, 3 deletions
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);
}