summaryrefslogtreecommitdiff
path: root/plugins/Exchange/src/utils.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2015-05-23 18:08:26 +0000
committerKirill Volinsky <mataes2007@gmail.com>2015-05-23 18:08:26 +0000
commit9cadeadaff74b37df1c2896e653a80b3ce4c86f6 (patch)
tree399715b05def27cc4e13ced2cbefad3a17b77c4e /plugins/Exchange/src/utils.cpp
parent6fcfba2c46a456677b5825a899469ba4e8905448 (diff)
replace _tcsncpy to mir_tstrncpy
git-svn-id: http://svn.miranda-ng.org/main/trunk@13786 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Exchange/src/utils.cpp')
-rw-r--r--plugins/Exchange/src/utils.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/Exchange/src/utils.cpp b/plugins/Exchange/src/utils.cpp
index e89a170732..0186ea9a07 100644
--- a/plugins/Exchange/src/utils.cpp
+++ b/plugins/Exchange/src/utils.cpp
@@ -95,15 +95,15 @@ char *BinToHex(int size, PBYTE data)
void HexToBin(TCHAR *inData, ULONG &size, LPBYTE &outData)
{
TCHAR buffer[32] = {0};
- _tcsncpy(buffer, _T("0x"),_countof(_T("0x")));
- _tcsncpy(buffer + 2, inData, HEX_SIZE);
+ mir_tstrncpy(buffer, _T("0x"),_countof(_T("0x")));
+ mir_tstrncpy(buffer + 2, inData, HEX_SIZE);
_stscanf(buffer, _T("%x"), &size);
outData = (unsigned char*)new char[size*2];
TCHAR *tmp = inData + HEX_SIZE;
buffer[4] = '\0'; //mark the end of the string
for (UINT i = 0; i < size; i++) {
- _tcsncpy(buffer + 2, &tmp[i * 2], 2);
+ mir_tstrncpy(buffer + 2, &tmp[i * 2], 2);
_stscanf(buffer, _T("%x"), &outData[i]);
}
}
@@ -118,7 +118,7 @@ int GetStringFromDatabase(char *szSettingName, TCHAR *szError, TCHAR *szResult,
res = 0;
int tmp = mir_tstrlen(dbv.ptszVal);
len = (tmp < size - 1) ? tmp : size - 1;
- _tcsncpy(szResult, dbv.ptszVal, len);
+ mir_tstrncpy(szResult, dbv.ptszVal, len);
szResult[len] = '\0';
mir_free(dbv.ptszVal);
}
@@ -126,7 +126,7 @@ int GetStringFromDatabase(char *szSettingName, TCHAR *szError, TCHAR *szResult,
res = 1;
int tmp = mir_tstrlen(szError);
len = (tmp < size - 1) ? tmp : size - 1;
- _tcsncpy(szResult, szError, len);
+ mir_tstrncpy(szResult, szError, len);
szResult[len] = '\0';
}
return res;
@@ -225,7 +225,7 @@ void _popupUtil(TCHAR* szMsg)
{
POPUPDATAT ppd = {0};
ppd.lchIcon = hiMailIcon;
- _tcsncpy(ppd.lptzContactName, _T("Exchange notifier"), MAX_CONTACTNAME-1);
- _tcsncpy(ppd.lptzText, szMsg,MAX_SECONDLINE-1);
+ mir_tstrncpy(ppd.lptzContactName, _T("Exchange notifier"), MAX_CONTACTNAME-1);
+ mir_tstrncpy(ppd.lptzText, szMsg,MAX_SECONDLINE-1);
PUAddPopupT(&ppd); //show a popup to tell the user what we're doing.
}