diff options
| author | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-23 18:08:26 +0000 | 
|---|---|---|
| committer | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-23 18:08:26 +0000 | 
| commit | 9cadeadaff74b37df1c2896e653a80b3ce4c86f6 (patch) | |
| tree | 399715b05def27cc4e13ced2cbefad3a17b77c4e /plugins/Exchange/src | |
| parent | 6fcfba2c46a456677b5825a899469ba4e8905448 (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')
| -rw-r--r-- | plugins/Exchange/src/MirandaExchange.cpp | 2 | ||||
| -rw-r--r-- | plugins/Exchange/src/utils.cpp | 14 | 
2 files changed, 8 insertions, 8 deletions
diff --git a/plugins/Exchange/src/MirandaExchange.cpp b/plugins/Exchange/src/MirandaExchange.cpp index 52a21e8a18..6b4a6996e5 100644 --- a/plugins/Exchange/src/MirandaExchange.cpp +++ b/plugins/Exchange/src/MirandaExchange.cpp @@ -435,7 +435,7 @@ HRESULT CMirandaExchange::InitializeAndLogin( LPCTSTR szUsername, LPCTSTR szPass  			TCHAR	szPID[20];
  			_tstrtime(szPID);
 -			_tcsncpy(szPIDandName, m_szUsername, SIZEOF(szPIDandName)-1);		
 +			mir_tstrncpy(szPIDandName, m_szUsername, SIZEOF(szPIDandName)-1);		
  			mir_tstrncat(szPIDandName, szPID, SIZEOF(szPIDandName) - mir_tstrlen(szPIDandName));
  			hr = CreateProfile(szPIDandName);
 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.
  }
  | 
