From 688f55ba998c19304a29727c910504903f4cc49a Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 30 Nov 2014 18:51:36 +0000 Subject: lstr* replacements git-svn-id: http://svn.miranda-ng.org/main/trunk@11176 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/WebView/src/webview_getdata.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'plugins/WebView/src/webview_getdata.cpp') diff --git a/plugins/WebView/src/webview_getdata.cpp b/plugins/WebView/src/webview_getdata.cpp index eef98ee250..9de894fd3e 100644 --- a/plugins/WebView/src/webview_getdata.cpp +++ b/plugins/WebView/src/webview_getdata.cpp @@ -37,7 +37,6 @@ void GetData(void *param) int MallocSize = 0; int DownloadSuccess = 0; char*raw; - char*szInfo; char truncated[MAXSIZE1]; char truncated2[MAXSIZE2]; int trunccount = 0; @@ -64,7 +63,6 @@ void GetData(void *param) ZeroMemory(&contactname, sizeof(contactname)); ZeroMemory(&tempstring, sizeof(tempstring)); ZeroMemory(&tempstring2, sizeof(tempstring2)); - ZeroMemory(&szInfo, sizeof(szInfo)); ZeroMemory(&dbv, sizeof(dbv)); ZeroMemory(&tstr, sizeof(tstr)); ZeroMemory(×tring, sizeof(timestring)); @@ -148,13 +146,13 @@ void GetData(void *param) db_set_ts(hContact, "CList", "StatusMsg", statusText); } if (nlhrReply->dataLength) { - int cbLen = lstrlenA(nlhrReply->pData); - szInfo = (char*)malloc(cbLen + 2); - lstrcpynA(szInfo, nlhrReply->pData, cbLen); - downloadsize = lstrlenA(nlhrReply->pData); + size_t cbLen = mir_strlen(nlhrReply->pData); + char *szInfo = (char*)malloc(cbLen + 2); + mir_strncpy(szInfo, nlhrReply->pData, cbLen); + downloadsize = mir_strlen(nlhrReply->pData); trunccount = 0; - lstrcpynA(truncated2, szInfo, MAXSIZE2); + mir_strncpy(truncated2, szInfo, MAXSIZE2); free(szInfo); //////////////////////////////////////////// @@ -193,7 +191,7 @@ void GetData(void *param) if (DownloadSuccess) { // all the site if (db_get_b(hContact, MODULENAME, U_ALLSITE_KEY, 0) == 1) - lstrcpynA(truncated, truncated2, MAXSIZE1); + mir_strncpy(truncated, truncated2, MAXSIZE1); else { // use start and end string // putting data into string if (((strstr(truncated2, tempstring)) != 0) && ((strstr(truncated2, tempstring2)) != 0)) { @@ -240,7 +238,7 @@ void GetData(void *param) trunccount = 0; - lstrcpynA(truncated, raw, MAXSIZE1); + mir_strncpy(truncated, raw, MAXSIZE1); free(raw); -- cgit v1.2.3