diff options
Diffstat (limited to 'src/mir_core')
-rw-r--r-- | src/mir_core/langpack.cpp | 2 | ||||
-rw-r--r-- | src/mir_core/path.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/mir_core/langpack.cpp b/src/mir_core/langpack.cpp index edbacee4b2..7401c0d991 100644 --- a/src/mir_core/langpack.cpp +++ b/src/mir_core/langpack.cpp @@ -364,7 +364,7 @@ static int LoadLangDescr(LANGPACK_INFO &lpinfo, FILE *fp, char *line, int &start if (!lpinfo.tszLanguage[0] && (lpinfo.Locale == 0) || !GetLocaleInfo(lpinfo.Locale, LOCALE_SENGLANGUAGE, lpinfo.tszLanguage, sizeof(lpinfo.tszLanguage))) {
TCHAR *p = _tcschr(lpinfo.tszFileName, '_');
- lstrcpyn(lpinfo.tszLanguage, p != NULL ? p + 1 : lpinfo.tszFileName, sizeof(lpinfo.tszLanguage));
+ mir_tstrncpy(lpinfo.tszLanguage, p != NULL ? p + 1 : lpinfo.tszFileName, sizeof(lpinfo.tszLanguage));
p = _tcsrchr(lpinfo.tszLanguage, _T('.'));
if (p != NULL) *p = '\0';
}
diff --git a/src/mir_core/path.cpp b/src/mir_core/path.cpp index ef95c31468..fbc3cff04b 100644 --- a/src/mir_core/path.cpp +++ b/src/mir_core/path.cpp @@ -95,7 +95,7 @@ MIR_CORE_DLL(void) CreatePathToFile(char *szFilePath) MIR_CORE_DLL(int) CreateDirectoryTree(const char *szDir)
{
char szTestDir[MAX_PATH];
- lstrcpynA(szTestDir, szDir, SIZEOF(szTestDir));
+ mir_strncpy(szTestDir, szDir, SIZEOF(szTestDir));
DWORD dwAttributes = GetFileAttributesA(szTestDir);
if (dwAttributes != INVALID_FILE_ATTRIBUTES && (dwAttributes & FILE_ATTRIBUTE_DIRECTORY))
@@ -179,7 +179,7 @@ MIR_CORE_DLL(void) CreatePathToFileW(WCHAR *wszFilePath) MIR_CORE_DLL(int) CreateDirectoryTreeW(const WCHAR *szDir)
{
WCHAR szTestDir[MAX_PATH];
- lstrcpynW(szTestDir, szDir, SIZEOF(szTestDir));
+ mir_wstrncpy(szTestDir, szDir, SIZEOF(szTestDir));
DWORD dwAttributes = GetFileAttributesW(szTestDir);
if (dwAttributes != INVALID_FILE_ATTRIBUTES && (dwAttributes & FILE_ATTRIBUTE_DIRECTORY))
|