summaryrefslogtreecommitdiff
path: root/src/mir_core/langpack.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mir_core/langpack.cpp')
-rw-r--r--src/mir_core/langpack.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mir_core/langpack.cpp b/src/mir_core/langpack.cpp
index 362e1230ba..29f633bc45 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, '_');
- mir_tstrncpy(lpinfo.tszLanguage, p != NULL ? p + 1 : lpinfo.tszFileName, sizeof(lpinfo.tszLanguage));
+ _tcsncpy_s(lpinfo.tszLanguage, ((p != NULL) ? (p + 1) : lpinfo.tszFileName), _TRUNCATE);
p = _tcsrchr(lpinfo.tszLanguage, _T('.'));
if (p != NULL) *p = '\0';
}