summaryrefslogtreecommitdiff
path: root/src/mir_core
diff options
context:
space:
mode:
authorRozhuk Ivan <rozhuk.im@gmail.com>2014-12-13 08:01:55 +0000
committerRozhuk Ivan <rozhuk.im@gmail.com>2014-12-13 08:01:55 +0000
commit303e6b483aff4126701ca375dd085e9ae1d18b43 (patch)
tree148d820728544a5fd6f6e87fdffbc5b80424c457 /src/mir_core
parentcce79a92d5341111997eaf7fd0a420fdddc3e50d (diff)
multiple buf size fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@11361 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/mir_core')
-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';
}