summaryrefslogtreecommitdiff
path: root/plugins/SmileyAdd/src/smileys.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/SmileyAdd/src/smileys.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/SmileyAdd/src/smileys.cpp')
-rw-r--r--plugins/SmileyAdd/src/smileys.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/SmileyAdd/src/smileys.cpp b/plugins/SmileyAdd/src/smileys.cpp
index 3c568b9735..c2dc9626e6 100644
--- a/plugins/SmileyAdd/src/smileys.cpp
+++ b/plugins/SmileyAdd/src/smileys.cpp
@@ -310,7 +310,7 @@ bool SmileyPackType::LoadSmileyFile(const CMString& filename, bool onlyInfo, boo
if (!noerr) {
static const TCHAR errmsg[] = LPGENT("Smiley pack %s not found.\nSelect correct smiley pack in the Options -> Customize -> Smileys.");
TCHAR msgtxt[1024];
- mir_sntprintf(msgtxt, SIZEOF(msgtxt), TranslateTS(errmsg), modpath.c_str());
+ mir_sntprintf(msgtxt, _countof(msgtxt), TranslateTS(errmsg), modpath.c_str());
ReportError(msgtxt);
}
@@ -473,7 +473,7 @@ bool SmileyPackType::LoadSmileyFileMSL(CMString& tbuf, bool onlyInfo, CMString&
if (!noerr) {
static const TCHAR errmsg[] = LPGENT("Smiley #%u in file %s for smiley pack %s not found.");
TCHAR msgtxt[1024];
- mir_sntprintf(msgtxt, SIZEOF(msgtxt), TranslateTS(errmsg), smnum, resname.c_str(), modpath.c_str());
+ mir_sntprintf(msgtxt, _countof(msgtxt), TranslateTS(errmsg), smnum, resname.c_str(), modpath.c_str());
CallService(MS_NETLIB_LOG, (WPARAM)hNetlibUser, _T2A(msgtxt));
errorFound = true;
}
@@ -855,7 +855,7 @@ void SmileyCategoryListType::AddAccountAsCategory(PROTOACCOUNT *acc, const CMStr
packnam = "MSN";
char path[MAX_PATH];
- mir_snprintf(path, SIZEOF(path), "Smileys\\nova\\%s.msl", packnam);
+ mir_snprintf(path, _countof(path), "Smileys\\nova\\%s.msl", packnam);
paths = A2T_SM(path);
CMString patha;
@@ -882,7 +882,7 @@ void SmileyCategoryListType::AddProtoAsCategory(char *acc, const CMString& defau
packnam = "MSN";
char path[MAX_PATH];
- mir_snprintf(path, SIZEOF(path), "Smileys\\nova\\%s.msl", packnam);
+ mir_snprintf(path, _countof(path), "Smileys\\nova\\%s.msl", packnam);
CMString paths = A2T_SM(path), patha;
pathToAbsolute(paths, patha);
@@ -953,7 +953,7 @@ void SmileyCategoryListType::AddContactTransportAsCategory(MCONTACT hContact, co
CMString displayName = dbv.ptszVal;
if (packname != NULL) {
char path[MAX_PATH];
- mir_snprintf(path, SIZEOF(path), "Smileys\\nova\\%s.msl", packname);
+ mir_snprintf(path, _countof(path), "Smileys\\nova\\%s.msl", packname);
CMString paths = A2T_SM(path), patha;
pathToAbsolute(paths, patha);
@@ -1033,13 +1033,13 @@ SmileyLookup::SmileyLookup(const CMString& str, const bool regexs, const int ind
matcher->getStartingIndex() != matcher->getEndingIndex());
if (!m_valid) {
static const TCHAR errmsg[] = LPGENT("Regular expression \"%s\" in smiley pack \"%s\" could produce \"empty matches\".");
- mir_sntprintf(msgtxt, SIZEOF(msgtxt), TranslateTS(errmsg), str.c_str(), smpt.c_str());
+ mir_sntprintf(msgtxt, _countof(msgtxt), TranslateTS(errmsg), str.c_str(), smpt.c_str());
}
delete matcher;
}
else {
static const TCHAR errmsg[] = LPGENT("Regular expression \"%s\" in smiley pack \"%s\" malformed.") ;
- mir_sntprintf(msgtxt, SIZEOF(msgtxt), TranslateTS(errmsg), str.c_str(), smpt.c_str());
+ mir_sntprintf(msgtxt, _countof(msgtxt), TranslateTS(errmsg), str.c_str(), smpt.c_str());
}
if (!m_valid)