diff options
author | George Hazan <ghazan@miranda.im> | 2020-05-04 12:09:06 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-05-04 12:09:13 +0300 |
commit | 234af11634949fee3c5e16721641a046c971598a (patch) | |
tree | a6a2cddf294450de7eddd3a7449767efb54c2269 /plugins/TabSRMM/src/themeio.cpp | |
parent | 1fedd3665b5fdb1772fe6bb85e6fb686eee58fd7 (diff) |
tabSRMM:
- ANSI crutch removed;
- LoadMsgDlgFont: useless parameter szMod removed;
- wcscpy replaced with safer call of wcsncpy_s;
- useless function LoadLogfont removed;
Diffstat (limited to 'plugins/TabSRMM/src/themeio.cpp')
-rw-r--r-- | plugins/TabSRMM/src/themeio.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/TabSRMM/src/themeio.cpp b/plugins/TabSRMM/src/themeio.cpp index 5b3b551d1d..a0299e27fd 100644 --- a/plugins/TabSRMM/src/themeio.cpp +++ b/plugins/TabSRMM/src/themeio.cpp @@ -97,7 +97,7 @@ static _extSettings_v5[] = * *lf = pointer to a LOGFONT structure which will receive the font definition
* *colour = pointer to a COLORREF which will receive the color of the font definition
*/
-static void TSAPI LoadLogfontFromINI(int i, char *szKey, LOGFONTA *lf, COLORREF *colour, const char *szIniFilename)
+static void TSAPI LoadLogfontFromINI(int i, char *szKey, LOGFONTW *lf, COLORREF *colour, const char *szIniFilename)
{
int style;
char bSize;
@@ -136,11 +136,10 @@ static void TSAPI LoadLogfontFromINI(int i, char *szKey, LOGFONTA *lf, COLORREF lf->lfQuality = DEFAULT_QUALITY;
lf->lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
if (i == MSGFONTID_SYMBOLS_IN || i == MSGFONTID_SYMBOLS_OUT) {
- strncpy_s(lf->lfFaceName, "Webdings", _TRUNCATE);
+ wcsncpy_s(lf->lfFaceName, L"Webdings", _TRUNCATE);
lf->lfCharSet = SYMBOL_CHARSET;
}
- else
- GetPrivateProfileStringA(szKey, "Face", "Tahoma", lf->lfFaceName, LF_FACESIZE - 1, szIniFilename);
+ else GetPrivateProfileStringW(_A2T(szKey), L"Face", L"Tahoma", lf->lfFaceName, _countof(lf->lfFaceName), _A2T(szIniFilename));
/*
* filter out font attributes from the message input area font
|