summaryrefslogtreecommitdiff
path: root/plugins/WebView/src/webview_services.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-07-28 20:06:35 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-07-28 20:06:35 +0000
commit790f2dcf2ba090ce24b83a14228abef564557b91 (patch)
tree783a903d130bbb3d9bd1abe8aa44ae92d334b822 /plugins/WebView/src/webview_services.cpp
parent28412b4c61183eb1b33adeee5dbc8e9cefc92d9f (diff)
some missing SIZEOFs
git-svn-id: http://svn.miranda-ng.org/main/trunk@5518 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/WebView/src/webview_services.cpp')
-rw-r--r--plugins/WebView/src/webview_services.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/WebView/src/webview_services.cpp b/plugins/WebView/src/webview_services.cpp
index 274b539352..78c4749b71 100644
--- a/plugins/WebView/src/webview_services.cpp
+++ b/plugins/WebView/src/webview_services.cpp
@@ -144,7 +144,7 @@ INT_PTR OpenCacheDir(WPARAM wParam, LPARAM lParam)
{
//GET NAME FOR CACHE
TCHAR cachepath[MAX_PATH], cachedirectorypath[MAX_PATH];
- GetModuleFileName(hInst, cachepath, sizeof(cachepath));
+ GetModuleFileName(hInst, cachepath, SIZEOF(cachepath));
TCHAR *cacheend = _tcsrchr(cachepath, '\\');
cacheend++;
*cacheend = '\0';
@@ -172,7 +172,7 @@ INT_PTR PingWebsiteMenuCommand(WPARAM wParam, LPARAM lParam)
return 0;
TCHAR Cnick[200], *Oldnick;
- _tcsncpy(Cnick, url, sizeof(Cnick));
+ _tcsncpy(Cnick, url, SIZEOF(Cnick));
if ((Oldnick = _tcsstr(Cnick, _T("://"))) != 0)
Oldnick += 3;
else
@@ -338,12 +338,9 @@ INT_PTR AddToList(WPARAM wParam, LPARAM lParam)
{
PROTOSEARCHRESULT *psr = (PROTOSEARCHRESULT *) lParam;
DBVARIANT dbv;
- TCHAR Cnick[255];
int sameurl = 0;
int samename = 0;
- ZeroMemory(&Cnick, sizeof(Cnick));
-
// search for existing contact
HANDLE hContact;
for (hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME)) {
@@ -382,8 +379,11 @@ INT_PTR AddToList(WPARAM wParam, LPARAM lParam)
db_set_b(hContact, MODULENAME, RWSPACE_KEY, 1);
//Convert url into a name for contact
+ TCHAR Cnick[255];
if (psr->nick != NULL)
_tcsncpy(Cnick, psr->nick, SIZEOF(Cnick));
+ else
+ Cnick[0] = 0;
TCHAR *Oldnick = _tcsstr(Cnick, _T("://"));
if (Oldnick != 0)