From 790f2dcf2ba090ce24b83a14228abef564557b91 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 28 Jul 2013 20:06:35 +0000 Subject: some missing SIZEOFs git-svn-id: http://svn.miranda-ng.org/main/trunk@5518 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/WebView/src/webview_services.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins/WebView/src/webview_services.cpp') 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) -- cgit v1.2.3