summaryrefslogtreecommitdiff
path: root/protocols/MRA
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-11-30 18:51:36 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-11-30 18:51:36 +0000
commit688f55ba998c19304a29727c910504903f4cc49a (patch)
tree69121ebb6d02bcf9e670428b11813087fc7f1640 /protocols/MRA
parent4f0e30cdf56fbafdf955bbe8b93930bab9e39bd0 (diff)
lstr* replacements
git-svn-id: http://svn.miranda-ng.org/main/trunk@11176 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/MRA')
-rw-r--r--protocols/MRA/src/MraAvatars.cpp4
-rw-r--r--protocols/MRA/src/MraChat.cpp4
-rw-r--r--protocols/MRA/src/MraFilesQueue.cpp4
-rw-r--r--protocols/MRA/src/MraIcons.cpp2
-rw-r--r--protocols/MRA/src/MraPopUp.cpp4
-rw-r--r--protocols/MRA/src/MraProto.cpp18
-rw-r--r--protocols/MRA/src/MraRTFMsg.cpp2
-rw-r--r--protocols/MRA/src/MraSendCommand.cpp4
-rw-r--r--protocols/MRA/src/Mra_functions.cpp24
-rw-r--r--protocols/MRA/src/Mra_options.cpp2
-rw-r--r--protocols/MRA/src/Mra_svcs.cpp6
11 files changed, 37 insertions, 37 deletions
diff --git a/protocols/MRA/src/MraAvatars.cpp b/protocols/MRA/src/MraAvatars.cpp
index 440ba67102..0ddab4b217 100644
--- a/protocols/MRA/src/MraAvatars.cpp
+++ b/protocols/MRA/src/MraAvatars.cpp
@@ -332,7 +332,7 @@ void CMraProto::MraAvatarsThreadProc(LPVOID lpParameter)
pai.hContact = pmraaqiAvatarsQueueItem->hContact;
pai.format = dwAvatarFormat;
if (db_get_b(NULL, MRA_AVT_SECT_NAME, "ReturnAbsolutePath", MRA_AVT_DEFAULT_RET_ABC_PATH))
- lstrcpyn(pai.filename, wszFileName, SIZEOF(pai.filename));
+ mir_tstrncpy(pai.filename, wszFileName, SIZEOF(pai.filename));
else
PathToRelativeT(wszFileName, pai.filename);
@@ -551,7 +551,7 @@ DWORD CMraProto::MraAvatarsQueueGetAvatar(HANDLE hAvatarsQueueHandle, DWORD dwFl
// файл с аватаром существует и не устарел/не было комманды обновлять(просто запрос имени)
if (lpszPath) {
if (db_get_b(NULL, MRA_AVT_SECT_NAME, "ReturnAbsolutePath", MRA_AVT_DEFAULT_RET_ABC_PATH))
- lstrcpyn(lpszPath, wszFileName, MAX_PATH);
+ mir_tstrncpy(lpszPath, wszFileName, MAX_PATH);
else
PathToRelativeT(wszFileName, lpszPath);
}
diff --git a/protocols/MRA/src/MraChat.cpp b/protocols/MRA/src/MraChat.cpp
index 69be898335..3dd6251320 100644
--- a/protocols/MRA/src/MraChat.cpp
+++ b/protocols/MRA/src/MraChat.cpp
@@ -192,8 +192,8 @@ int CMraProto::MraChatGcEventHook(WPARAM, LPARAM lParam)
if (!_stricmp(gch->pDest->pszModule, m_szModuleName)) {
switch (gch->pDest->iType) {
case GC_USER_MESSAGE:
- if (gch->ptszText && lstrlen(gch->ptszText)) {
- size_t dwMessageSize = lstrlenW(gch->ptszText);
+ if (gch->ptszText && mir_tstrlen(gch->ptszText)) {
+ size_t dwMessageSize = mir_wstrlen(gch->ptszText);
CMStringA szEmail = gch->pDest->ptszID;
MCONTACT hContact = MraHContactFromEmail(szEmail, FALSE, TRUE, NULL);
BOOL bSlowSend = getByte("SlowSend", MRA_DEFAULT_SLOW_SEND);
diff --git a/protocols/MRA/src/MraFilesQueue.cpp b/protocols/MRA/src/MraFilesQueue.cpp
index eaca08cc52..10b0678a9b 100644
--- a/protocols/MRA/src/MraFilesQueue.cpp
+++ b/protocols/MRA/src/MraFilesQueue.cpp
@@ -662,7 +662,7 @@ DWORD CMraProto::MraFilesQueueAddReceive(HANDLE hFilesQueueHandle, DWORD dwFlags
MRA_FILES_QUEUE_FILE &p = dat->pmfqfFiles[dat->dwFilesCount];
p.lpwszName = mir_wstrdup(wszCurrFile);
- p.dwNameLen = lstrlen(p.lpwszName);
+ p.dwNameLen = mir_tstrlen(p.lpwszName);
p.dwSize = _wtoi(wszCurrSize);
dat->dwFilesTotalSize += p.dwSize;
dwFileNameTotalSize += p.dwNameLen * sizeof(TCHAR);
@@ -946,7 +946,7 @@ DWORD CMraProto::MraFilesQueueAddSend(HANDLE hFilesQueueHandle, DWORD dwFlags, M
}
else p.dwSize = 0;
- p.dwNameLen = lstrlenW(plpwszFiles[i]);
+ p.dwNameLen = mir_wstrlen(plpwszFiles[i]);
p.lpwszName = mir_wstrdup(plpwszFiles[i]);
}
diff --git a/protocols/MRA/src/MraIcons.cpp b/protocols/MRA/src/MraIcons.cpp
index a36c6f9d35..0b6c61130d 100644
--- a/protocols/MRA/src/MraIcons.cpp
+++ b/protocols/MRA/src/MraIcons.cpp
@@ -79,7 +79,7 @@ void InitXStatusIcons()
LPWSTR lpwszFileName;
g_dwMirWorkDirPathLen = GetFullPathName(szBuff, MAX_FILEPATH, g_szMirWorkDirPath, &lpwszFileName);
if (g_dwMirWorkDirPathLen) {
- g_dwMirWorkDirPathLen -= lstrlenW(lpwszFileName);
+ g_dwMirWorkDirPathLen -= mir_wstrlen(lpwszFileName);
g_szMirWorkDirPath[g_dwMirWorkDirPathLen] = 0;
// load xstatus icons lib
diff --git a/protocols/MRA/src/MraPopUp.cpp b/protocols/MRA/src/MraPopUp.cpp
index 87bac3d0a1..805cd75e62 100644
--- a/protocols/MRA/src/MraPopUp.cpp
+++ b/protocols/MRA/src/MraPopUp.cpp
@@ -256,9 +256,9 @@ void CMraProto::MraPopupShowW(MCONTACT hContact, DWORD dwType, DWORD dwFlags, LP
ppd.lchContact = hContact;
if (lpszTitle)
- lstrcpyn(ppd.lptzContactName, lpszTitle, MAX_CONTACTNAME);
+ mir_tstrncpy(ppd.lptzContactName, lpszTitle, MAX_CONTACTNAME);
if (lpszMessage)
- lstrcpyn(ppd.lptzText, lpszMessage, MAX_SECONDLINE);
+ mir_tstrncpy(ppd.lptzText, lpszMessage, MAX_SECONDLINE);
ppd.PluginWindowProc = MraPopupDlgProc;
ppd.PluginData = dat;
diff --git a/protocols/MRA/src/MraProto.cpp b/protocols/MRA/src/MraProto.cpp
index 6ddfb6704c..97324fdd53 100644
--- a/protocols/MRA/src/MraProto.cpp
+++ b/protocols/MRA/src/MraProto.cpp
@@ -205,9 +205,9 @@ int CMraProto::Authorize(HANDLE hDBEvent)
if (strcmp(dbei.szModule, m_szModuleName)) return 1;
LPSTR lpszNick = (LPSTR)(dbei.pBlob + sizeof(DWORD) * 2);
- LPSTR lpszFirstName = lpszNick + lstrlenA(lpszNick) + 1;
- LPSTR lpszLastName = lpszFirstName + lstrlenA(lpszFirstName) + 1;
- MraAuthorize(CMStringA(lpszLastName + lstrlenA(lpszLastName) + 1));
+ LPSTR lpszFirstName = lpszNick + mir_strlen(lpszNick) + 1;
+ LPSTR lpszLastName = lpszFirstName + mir_strlen(lpszFirstName) + 1;
+ MraAuthorize(CMStringA(lpszLastName + mir_strlen(lpszLastName) + 1));
return 0;
}
@@ -225,9 +225,9 @@ int CMraProto::AuthDeny(HANDLE hDBEvent, const TCHAR* szReason)
if (strcmp(dbei.szModule, m_szModuleName)) return 1;
LPSTR lpszNick = (LPSTR)(dbei.pBlob + sizeof(DWORD) * 2);
- LPSTR lpszFirstName = lpszNick + lstrlenA(lpszNick) + 1;
- LPSTR lpszLastName = lpszFirstName + lstrlenA(lpszFirstName) + 1;
- LPSTR szEmail = lpszLastName + lstrlenA(lpszLastName) + 1;
+ LPSTR lpszFirstName = lpszNick + mir_strlen(lpszNick) + 1;
+ LPSTR lpszLastName = lpszFirstName + mir_strlen(lpszFirstName) + 1;
+ LPSTR szEmail = lpszLastName + mir_strlen(lpszLastName) + 1;
MraMessage(FALSE, NULL, 0, 0, szEmail, szReason, NULL, 0);
return 0;
@@ -249,7 +249,7 @@ int CMraProto::AuthRequest(MCONTACT hContact, const TCHAR *lptszMessage)
HANDLE CMraProto::FileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHAR *szPath)
{
if (szPath != NULL)
- if (MraFilesQueueAccept(hFilesQueueHandle, (DWORD)hTransfer, szPath, lstrlen(szPath)) == NO_ERROR)
+ if (MraFilesQueueAccept(hFilesQueueHandle, (DWORD)hTransfer, szPath, mir_tstrlen(szPath)) == NO_ERROR)
return hTransfer; // Success
return NULL;
@@ -421,7 +421,7 @@ int CMraProto::SendMsg(MCONTACT hContact, int flags, const char *lpszMessage)
int iRet = 0;
if (flags & PREF_UNICODE)
- lpwszMessage = (LPWSTR)(lpszMessage + lstrlenA(lpszMessage) + 1);
+ lpwszMessage = (LPWSTR)(lpszMessage + mir_strlen(lpszMessage) + 1);
else if (flags & PREF_UTF)
lpwszMessage = mir_utf8decodeT(lpszMessage);
else
@@ -576,7 +576,7 @@ int CMraProto::SetAwayMsg(int m_iStatus, const TCHAR* msg)
if (!m_bLoggedIn)
return 1;
- size_t dwStatusDescSize = lstrlen(msg);
+ size_t dwStatusDescSize = mir_tstrlen(msg);
DWORD dwStatus = m_iStatus;
DWORD dwXStatus = m_iXStatus;
diff --git a/protocols/MRA/src/MraRTFMsg.cpp b/protocols/MRA/src/MraRTFMsg.cpp
index 03401631c6..89e21c867a 100644
--- a/protocols/MRA/src/MraRTFMsg.cpp
+++ b/protocols/MRA/src/MraRTFMsg.cpp
@@ -210,7 +210,7 @@ DWORD CMraProto::MraConvertToRTFW(const CMStringW &wszMessage, CMStringA &szMess
HDC hDC = GetDC(NULL);// kegl
lf.lfCharSet = MRA_DEFAULT_RTF_FONT_CHARSET;
lf.lfHeight = -MulDiv(MRA_DEFAULT_RTF_FONT_SIZE, GetDeviceCaps(hDC, LOGPIXELSY), 72);
- lstrcpyn(lf.lfFaceName, MRA_DEFAULT_RTF_FONT_NAME, LF_FACESIZE);
+ mir_tstrncpy(lf.lfFaceName, MRA_DEFAULT_RTF_FONT_NAME, LF_FACESIZE);
ReleaseDC(NULL, hDC);
}
dwFontSize = ((-lf.lfHeight)+(((-lf.lfHeight)+4)/8));
diff --git a/protocols/MRA/src/MraSendCommand.cpp b/protocols/MRA/src/MraSendCommand.cpp
index 220d9a2c96..b25fb0033c 100644
--- a/protocols/MRA/src/MraSendCommand.cpp
+++ b/protocols/MRA/src/MraSendCommand.cpp
@@ -110,7 +110,7 @@ DWORD CMraProto::MraMessage(BOOL bAddToQueue, MCONTACT hContact, DWORD dwAckType
DWORD dwRTFDataSize = buf.Len();
if ( compress2((LPBYTE)lpbRTFData, &dwRTFDataSize, buf.Data(), buf.Len(), Z_BEST_COMPRESSION) == Z_OK) {
lpszMessageRTF = mir_base64_encode((LPBYTE)lpbRTFData, dwRTFDataSize);
- dwMessageRTFSize = lstrlenA(lpszMessageRTF);
+ dwMessageRTFSize = mir_strlen(lpszMessageRTF);
}
}
// standart message
@@ -130,7 +130,7 @@ DWORD CMraProto::MraMessage(BOOL bAddToQueue, MCONTACT hContact, DWORD dwAckType
DWORD dwRTFDataSize = lpbRTFData.GetLength();
if ( compress2((LPBYTE)(LPCSTR)lpbRTFData, &dwRTFDataSize, buf.Data(), buf.Len(), Z_BEST_COMPRESSION) == Z_OK) {
lpszMessageRTF = mir_base64_encode((LPBYTE)(LPCSTR)lpbRTFData, dwRTFDataSize);
- dwMessageRTFSize = lstrlenA(lpszMessageRTF);
+ dwMessageRTFSize = mir_strlen(lpszMessageRTF);
}
}
}
diff --git a/protocols/MRA/src/Mra_functions.cpp b/protocols/MRA/src/Mra_functions.cpp
index a9af00ed8c..0a460c7cf2 100644
--- a/protocols/MRA/src/Mra_functions.cpp
+++ b/protocols/MRA/src/Mra_functions.cpp
@@ -215,7 +215,7 @@ bool DB_GetStaticStringW(MCONTACT hContact, LPCSTR lpszModule, LPCSTR lpszValueN
size_t dwReadedStringLen;
DBVARIANT dbv = { 0 };
if (db_get_ws(hContact, lpszModule, lpszValueName, &dbv) == 0) {
- dwReadedStringLen = lstrlenW(dbv.pwszVal);
+ dwReadedStringLen = mir_wstrlen(dbv.pwszVal);
if (lpwszRetBuff && (dwRetBuffSize > dwReadedStringLen)) {
memmove(lpwszRetBuff, dbv.pszVal, (dwReadedStringLen*sizeof(WCHAR)));//include null terminated
(*((WCHAR*)(lpwszRetBuff + dwReadedStringLen))) = 0;
@@ -641,8 +641,8 @@ void CMraProto::MraUpdateEmailStatus(const CMStringA &pszFrom, const CMStringA &
if (m_dwEmailMessagesUnread) {
CMStringA szEmail;
MCONTACT hContact = NULL;
- TCHAR szMailBoxStatus[MAX_SECONDLINE];
+ TCHAR szMailBoxStatus[MAX_SECONDLINE];
mir_sntprintf(szMailBoxStatus, SIZEOF(szMailBoxStatus), TranslateT("Unread mail is available: %lu/%lu messages"), m_dwEmailMessagesUnread, dwEmailMessagesTotal);
if (!pszFrom.IsEmpty() || !pszSubject.IsEmpty()) {
@@ -652,7 +652,7 @@ void CMraProto::MraUpdateEmailStatus(const CMStringA &pszFrom, const CMStringA &
mir_sntprintf(szStatusText, SIZEOF(szStatusText), TranslateT("From: %S\r\nSubject: %S\r\n%s"), pszFrom.c_str(), szSubject.c_str(), szMailBoxStatus);
}
- else lstrcpyn(szStatusText, szMailBoxStatus, SIZEOF(szStatusText));
+ else _tcsncpy_s(szStatusText, szMailBoxStatus, _TRUNCATE);
if (bTrayIconNewMailNotify) {
char szServiceFunction[MAX_PATH], *pszServiceFunctionName;
@@ -763,7 +763,7 @@ bool IsEMailMR(const CMStringA &szEmail)
{
if (szEmail) {
for (int i = 0; lpcszMailRuDomains[i]; i++) {
- int dwDomainLen = lstrlenA(lpcszMailRuDomains[i]);
+ int dwDomainLen = mir_strlen(lpcszMailRuDomains[i]);
if (dwDomainLen < szEmail.GetLength())
if (!_stricmp(lpcszMailRuDomains[i], szEmail.c_str() + szEmail.GetLength() - dwDomainLen))
if (szEmail[szEmail.GetLength() - dwDomainLen - 1] == '@')
@@ -1050,8 +1050,8 @@ INT_PTR CALLBACK SetXStatusDlgProc(HWND hWndDlg, UINT message, WPARAM wParam, LP
dwBuffSize = GetDlgItemText(hWndDlg, IDC_XTITLE, szBuff, (STATUS_TITLE_MAX + 1));
if (dwBuffSize == 0) { // user delete all text
- lstrcpyn(szBuff, TranslateTS(lpcszXStatusNameDef[dat->dwXStatus]), (STATUS_TITLE_MAX + 1));
- dwBuffSize = lstrlenW(szBuff);
+ mir_tstrncpy(szBuff, TranslateTS(lpcszXStatusNameDef[dat->dwXStatus]), STATUS_TITLE_MAX + 1);
+ dwBuffSize = mir_wstrlen(szBuff);
}
mir_snprintf(szValueName, SIZEOF(szValueName), "XStatus%dName", dat->dwXStatus);
dat->ppro->mraSetStringExW(NULL, szValueName, szBuff);
@@ -1231,8 +1231,8 @@ DWORD FindFile(LPWSTR lpszFolder, DWORD dwFolderLen, LPWSTR lpszFileName, DWORD
DWORD dwPathLen, dwRecDeepAllocated, dwRecDeepCurPos, dwFilePathLen;
RECURSION_DATA_STACK_ITEM *prdsiItems;
- if (dwFolderLen == -1) dwFolderLen = lstrlenW(lpszFolder);
- if (dwFileNameLen == -1) dwFileNameLen = lstrlenW(lpszFileName);
+ if (dwFolderLen == -1) dwFolderLen = mir_wstrlen(lpszFolder);
+ if (dwFileNameLen == -1) dwFileNameLen = mir_wstrlen(lpszFileName);
dwRecDeepCurPos = 0;
dwRecDeepAllocated = RECURSION_DATA_STACK_ITEMS_MIN;
@@ -1245,7 +1245,7 @@ DWORD FindFile(LPWSTR lpszFolder, DWORD dwFolderLen, LPWSTR lpszFileName, DWORD
dwPathLen++;
}
szPath[dwPathLen] = 0;
- lstrcat(szPath, _T("*.*"));
+ mir_tstrcat(szPath, _T("*.*"));
prdsiItems[dwRecDeepCurPos].dwFileNameLen = 0;
prdsiItems[dwRecDeepCurPos].hFind = FindFirstFileEx(szPath, FindExInfoStandard, &prdsiItems[dwRecDeepCurPos].w32fdFindFileData, FindExSearchNameMatch, NULL, 0);
@@ -1258,9 +1258,9 @@ DWORD FindFile(LPWSTR lpszFolder, DWORD dwFolderLen, LPWSTR lpszFileName, DWORD
if (prdsiItems[dwRecDeepCurPos].w32fdFindFileData.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY) {// folder
if (CompareString(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), NORM_IGNORECASE, prdsiItems[dwRecDeepCurPos].w32fdFindFileData.cFileName, -1, _T("."), 1) != CSTR_EQUAL)
if (CompareString(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), NORM_IGNORECASE, prdsiItems[dwRecDeepCurPos].w32fdFindFileData.cFileName, -1, _T(".."), 2) != CSTR_EQUAL) {
- prdsiItems[dwRecDeepCurPos].dwFileNameLen = (lstrlenW(prdsiItems[dwRecDeepCurPos].w32fdFindFileData.cFileName) + 1);
+ prdsiItems[dwRecDeepCurPos].dwFileNameLen = (mir_wstrlen(prdsiItems[dwRecDeepCurPos].w32fdFindFileData.cFileName) + 1);
memmove((szPath + dwPathLen), prdsiItems[dwRecDeepCurPos].w32fdFindFileData.cFileName, (prdsiItems[dwRecDeepCurPos].dwFileNameLen*sizeof(WCHAR)));
- lstrcat(szPath, _T("\\*.*"));
+ mir_tstrcat(szPath, _T("\\*.*"));
dwPathLen += prdsiItems[dwRecDeepCurPos].dwFileNameLen;
dwRecDeepCurPos++;
@@ -1278,7 +1278,7 @@ DWORD FindFile(LPWSTR lpszFolder, DWORD dwFolderLen, LPWSTR lpszFileName, DWORD
}
else {// file
if (CompareString(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), NORM_IGNORECASE, prdsiItems[dwRecDeepCurPos].w32fdFindFileData.cFileName, -1, lpszFileName, dwFileNameLen) == CSTR_EQUAL) {
- prdsiItems[dwRecDeepCurPos].dwFileNameLen = lstrlenW(prdsiItems[dwRecDeepCurPos].w32fdFindFileData.cFileName);
+ prdsiItems[dwRecDeepCurPos].dwFileNameLen = mir_wstrlen(prdsiItems[dwRecDeepCurPos].w32fdFindFileData.cFileName);
memmove((szPath + dwPathLen), prdsiItems[dwRecDeepCurPos].w32fdFindFileData.cFileName, ((prdsiItems[dwRecDeepCurPos].dwFileNameLen + 1)*sizeof(WCHAR)));
dwFilePathLen = (dwPathLen + prdsiItems[dwRecDeepCurPos].dwFileNameLen);
diff --git a/protocols/MRA/src/Mra_options.cpp b/protocols/MRA/src/Mra_options.cpp
index 9498b1ceca..fa15c971d3 100644
--- a/protocols/MRA/src/Mra_options.cpp
+++ b/protocols/MRA/src/Mra_options.cpp
@@ -168,7 +168,7 @@ INT_PTR CALLBACK DlgProcOptsConnections(HWND hWndDlg, UINT msg, WPARAM wParam, L
HDC hDC = GetDC(NULL);// kegl
lf.lfCharSet = MRA_DEFAULT_RTF_FONT_CHARSET;
lf.lfHeight = -MulDiv(MRA_DEFAULT_RTF_FONT_SIZE, GetDeviceCaps(hDC, LOGPIXELSY), 72);
- lstrcpyn(lf.lfFaceName, MRA_DEFAULT_RTF_FONT_NAME, LF_FACESIZE);
+ mir_tstrncpy(lf.lfFaceName, MRA_DEFAULT_RTF_FONT_NAME, LF_FACESIZE);
ReleaseDC(NULL, hDC);
}
diff --git a/protocols/MRA/src/Mra_svcs.cpp b/protocols/MRA/src/Mra_svcs.cpp
index 28d8d05590..f114c956fe 100644
--- a/protocols/MRA/src/Mra_svcs.cpp
+++ b/protocols/MRA/src/Mra_svcs.cpp
@@ -466,9 +466,9 @@ INT_PTR CMraProto::MraGetXStatusEx(WPARAM hContact, LPARAM lParam)
return 1;
if (pData->flags & CSSF_UNICODE)
- lstrcpyn(pData->ptszName, lpcszXStatusNameDef[dwXStatus], (STATUS_TITLE_MAX + 1));
+ mir_tstrncpy(pData->ptszName, lpcszXStatusNameDef[dwXStatus], (STATUS_TITLE_MAX + 1));
else {
- size_t dwStatusTitleSize = lstrlen(lpcszXStatusNameDef[dwXStatus]);
+ size_t dwStatusTitleSize = mir_tstrlen(lpcszXStatusNameDef[dwXStatus]);
if (dwStatusTitleSize > STATUS_TITLE_MAX)
dwStatusTitleSize = STATUS_TITLE_MAX;
@@ -631,7 +631,7 @@ INT_PTR CMraProto::MraGetMyAvatar(WPARAM wParam, LPARAM lParam)
{
CMStringW wszFileName;
if (MraAvatarsGetFileName(hAvatarsQueueHandle, NULL, GetContactAvatarFormat(NULL, PA_FORMAT_DEFAULT), wszFileName) == NO_ERROR) {
- lstrcpyn((LPTSTR)wParam, wszFileName, (size_t)lParam);
+ mir_tstrncpy((LPTSTR)wParam, wszFileName, (size_t)lParam);
return 0;
}
return 1;