summaryrefslogtreecommitdiff
path: root/protocols/IcqOscarJ/src/editstring.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 /protocols/IcqOscarJ/src/editstring.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 'protocols/IcqOscarJ/src/editstring.cpp')
-rw-r--r--protocols/IcqOscarJ/src/editstring.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/protocols/IcqOscarJ/src/editstring.cpp b/protocols/IcqOscarJ/src/editstring.cpp
index 2ea8f8eb1c..1cd3a2f805 100644
--- a/protocols/IcqOscarJ/src/editstring.cpp
+++ b/protocols/IcqOscarJ/src/editstring.cpp
@@ -79,7 +79,7 @@ static void EscapesToBinary(char *str)
memmove(str+1,codeend,mir_strlen(codeend)+1);
continue;
}
- for(int i=0;i<SIZEOF(escapes);i+=2)
+ for(int i=0;i<_countof(escapes);i+=2)
if(str[1]==escapes[i])
{
*str=escapes[i+1];
@@ -117,14 +117,14 @@ char *BinaryToEscapes(char *str)
pout=out=(char*)SAFE_REALLOC(out,len);
}
*pout++='\\';
- for(i = 0; i < SIZEOF(escapes); i += 2)
+ for(i = 0; i < _countof(escapes); i += 2)
if (*str==escapes[i+1])
{
*pout++=escapes[i];
extra--;
break;
}
- if(i < SIZEOF(escapes)) continue;
+ if(i < _countof(escapes)) continue;
*pout++='0'; extra--;
if (*str>=8)
{
@@ -325,7 +325,7 @@ void ChangeInfoData::EndStringEdit(int save)
if (sid.changed) {
TCHAR tbuf[MAX_PATH];
- GetWindowText(hwndEdit, tbuf, SIZEOF(tbuf));
+ GetWindowText(hwndEdit, tbuf, _countof(tbuf));
ListView_SetItemText(hwndList, iEditItem, 1, tbuf);
EnableDlgItem(hwndDlg, IDC_SAVE, TRUE);