summaryrefslogtreecommitdiff
path: root/plugins/Non-IM Contact/src/main.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/Non-IM Contact/src/main.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/Non-IM Contact/src/main.cpp')
-rw-r--r--plugins/Non-IM Contact/src/main.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/Non-IM Contact/src/main.cpp b/plugins/Non-IM Contact/src/main.cpp
index 7b556e486e..5b41419efd 100644
--- a/plugins/Non-IM Contact/src/main.cpp
+++ b/plugins/Non-IM Contact/src/main.cpp
@@ -32,8 +32,8 @@ INT_PTR doubleClick(WPARAM wParam, LPARAM lParam)
if (proto && !mir_strcmp(proto, MODNAME)) {
if (GetKeyState(VK_CONTROL) & 0x8000) // ctrl is pressed
editContact(wParam, 0); // for later when i add a second double click setting
- else if (db_get_static(wParam, MODNAME, "Program", program, SIZEOF(program)) && mir_strcmp(program, "")) {
- if (!db_get_static(wParam, MODNAME, "ProgramParams", params, SIZEOF(params)))
+ else if (db_get_static(wParam, MODNAME, "Program", program, _countof(program)) && mir_strcmp(program, "")) {
+ if (!db_get_static(wParam, MODNAME, "ProgramParams", params, _countof(params)))
mir_strcpy(params, "");
if (strstr(program, "http://") || strstr(program, "https://"))
CallService(MS_UTILS_OPENURL, OUF_NEWWINDOW, (LPARAM)program);
@@ -118,7 +118,7 @@ extern "C" __declspec(dllexport) int Load()
mir_getLP(&pluginInfoEx);
mir_getCLI();
- Icon_Register(hInst, LPGEN("Non-IM Contact"), icoList, SIZEOF(icoList));
+ Icon_Register(hInst, LPGEN("Non-IM Contact"), icoList, _countof(icoList));
HookEvent(ME_CLIST_DOUBLECLICKED, (MIRANDAHOOK)doubleClick);
HookEvent(ME_OPT_INITIALISE, NimcOptInit);