summaryrefslogtreecommitdiff
path: root/plugins/PasteIt/src/PasteToWeb.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/PasteIt/src/PasteToWeb.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/PasteIt/src/PasteToWeb.cpp')
-rw-r--r--plugins/PasteIt/src/PasteToWeb.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/PasteIt/src/PasteToWeb.cpp b/plugins/PasteIt/src/PasteToWeb.cpp
index 9b7a846d07..52f7c8f147 100644
--- a/plugins/PasteIt/src/PasteToWeb.cpp
+++ b/plugins/PasteIt/src/PasteToWeb.cpp
@@ -384,7 +384,7 @@ void PasteToWeb::FromFile(std::wstring file)
{
if (fileSize.QuadPart > 512000LL)
{
- mir_sntprintf(bufErr, SIZEOF(bufErr), TranslateT("File size is %d KB, do you really want to paste such a large file?"), fileSize.LowPart / 1024);
+ mir_sntprintf(bufErr, _countof(bufErr), TranslateT("File size is %d KB, do you really want to paste such a large file?"), fileSize.LowPart / 1024);
if (MessageBox(NULL, bufErr, TranslateT("Are You sure?"), MB_YESNO | MB_ICONQUESTION) != IDYES)
{
CloseHandle(hFile);
@@ -399,7 +399,7 @@ void PasteToWeb::FromFile(std::wstring file)
mir_free(fromFileData.content);
fromFileData.content = NULL;
fromFileData.contentLen = 0;
- mir_sntprintf(bufErr, SIZEOF(bufErr), TranslateT("Cannot read file '%s'"), file.c_str());
+ mir_sntprintf(bufErr, _countof(bufErr), TranslateT("Cannot read file '%s'"), file.c_str());
error = bufErr;
}
}
@@ -413,7 +413,7 @@ void PasteToWeb::FromFile(std::wstring file)
}
else
{
- mir_sntprintf(bufErr, SIZEOF(bufErr), TranslateT("Cannot open file '%s'"), file.c_str());
+ mir_sntprintf(bufErr, _countof(bufErr), TranslateT("Cannot open file '%s'"), file.c_str());
error = bufErr;
}
@@ -491,7 +491,7 @@ void PasteToWeb::FromFile(std::wstring file)
}
else
{
- mir_sntprintf(bufErr, SIZEOF(bufErr), TranslateT("File '%s' is empty"), file.c_str());
+ mir_sntprintf(bufErr, _countof(bufErr), TranslateT("File '%s' is empty"), file.c_str());
error = bufErr;
}
mir_free(fromFileData.content);