diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-07 21:20:21 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-07 21:20:21 +0000 |
commit | f8c2ad822cfd7cf7091ac85e3bec5747433646f1 (patch) | |
tree | 1ef7824a147dbe990582e783d8f4f19c688c036a /plugins/Clist_modern | |
parent | a674fbe45df718f194948a7fa399c58fd9672519 (diff) |
fixed chinese in Clist_modern skin options dialog
git-svn-id: http://svn.miranda-ng.org/main/trunk@14062 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern')
-rw-r--r-- | plugins/Clist_modern/src/modern_skinopt.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/Clist_modern/src/modern_skinopt.cpp b/plugins/Clist_modern/src/modern_skinopt.cpp index 23423c8df5..5c603ad699 100644 --- a/plugins/Clist_modern/src/modern_skinopt.cpp +++ b/plugins/Clist_modern/src/modern_skinopt.cpp @@ -409,16 +409,16 @@ HTREEITEM AddSkinToList(HWND hwndDlg, TCHAR * path, TCHAR* file) return 0; if (!file || _tcschr(file, _T('%'))) { - mir_sntprintf(sd->File, SIZEOF(sd->File), _T("%%Default Skin%%")); - mir_sntprintf(sd->Name, SIZEOF(sd->Name), TranslateT("%Default Skin%")); - mir_tstrncpy(fullName, TranslateT("Default Skin"), SIZEOF(fullName)); + mir_sntprintf(sd->File, _T("%%Default Skin%%")); + mir_sntprintf(sd->Name, TranslateT("%Default Skin%")); + _tcsncpy_s(fullName, TranslateT("Default Skin"), _TRUNCATE); } else { mir_sntprintf(fullName, SIZEOF(fullName), _T("%s\\%s"), path, file); - memcpy(defskinname, file, (mir_tstrlen(file) - 4) * sizeof(TCHAR)); - defskinname[mir_tstrlen(file) + 1] = _T('\0'); + _tcsncpy_s(defskinname, file, _TRUNCATE); + TCHAR *p = _tcsrchr(defskinname, '.'); if (p) *p = 0; GetPrivateProfileString(_T("Skin_Description_Section"), _T("Name"), defskinname, sd->Name, SIZEOF(sd->Name), fullName); - mir_tstrcpy(sd->File, fullName); + _tcsncpy_s(sd->File, fullName, _TRUNCATE); } return AddItemToTree(GetDlgItem(hwndDlg, IDC_TREE1), sd->Name, sd); } |