summaryrefslogtreecommitdiff
path: root/src/mir_core
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-03-23 14:54:49 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-03-23 14:54:49 +0000
commitc4377e69f54685eda623f9a63d805f47594d3df1 (patch)
treef01510ed61dc57bf25627bee04791c59d45f429d /src/mir_core
parent529acfcd816575c027b6531550268ec408de3a25 (diff)
wrong copy/paste
git-svn-id: http://svn.miranda-ng.org/main/trunk@8704 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/mir_core')
-rw-r--r--src/mir_core/langpack.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mir_core/langpack.cpp b/src/mir_core/langpack.cpp
index 64a94bc57c..2fadf0f073 100644
--- a/src/mir_core/langpack.cpp
+++ b/src/mir_core/langpack.cpp
@@ -394,11 +394,10 @@ MIR_CORE_DLL(int) LoadLangPackDescr(const TCHAR *szLangPack, LANGPACK_INFO *lpIn
if (lpInfo == NULL)
return 1;
- lstrcpy(lpInfo->tszFileName, szLangPack);
- lstrcpy(lpInfo->tszFullPath, szLangPack);
+ _tcsncpy_s(lpInfo->tszFullPath, SIZEOF(lpInfo->tszFullPath), szLangPack, _TRUNCATE);
TCHAR *p = _tcsrchr(lpInfo->tszFullPath, '\\');
- if (p)
- p[1] = 0;
+ _tcsncpy_s(lpInfo->tszFileName, SIZEOF(lpInfo->tszFullPath), (p == NULL) ? szLangPack : p+1, _TRUNCATE);
+ CharLower(lpInfo->tszFileName);
FILE *fp = _tfopen(szLangPack, _T("rt"));
if (fp == NULL)