summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/container.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-05-04 12:09:06 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-05-04 12:09:13 +0300
commit234af11634949fee3c5e16721641a046c971598a (patch)
treea6a2cddf294450de7eddd3a7449767efb54c2269 /plugins/TabSRMM/src/container.cpp
parent1fedd3665b5fdb1772fe6bb85e6fb686eee58fd7 (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/container.cpp')
-rw-r--r--plugins/TabSRMM/src/container.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp
index 2e3e4f8e82..acebc25dc2 100644
--- a/plugins/TabSRMM/src/container.cpp
+++ b/plugins/TabSRMM/src/container.cpp
@@ -463,7 +463,7 @@ void TContainerData::LoadOverrideTheme()
memcpy(m_rtl_templates, &RTL_Active, sizeof(TTemplateSet));
}
- m_theme.logFonts = (LOGFONTA *)mir_alloc(sizeof(LOGFONTA) * (MSGDLGFONTCOUNT + 2));
+ m_theme.logFonts = (LOGFONTW *)mir_alloc(sizeof(LOGFONTW) * (MSGDLGFONTCOUNT + 2));
m_theme.fontColors = (COLORREF *)mir_alloc(sizeof(COLORREF) * (MSGDLGFONTCOUNT + 2));
m_theme.rtfFonts = (char *)mir_alloc((MSGDLGFONTCOUNT + 2) * RTFCACHELINESIZE);
@@ -2155,7 +2155,7 @@ TContainerData* TSAPI CreateContainer(const wchar_t *name, int iTemp, MCONTACT h
return nullptr;
TContainerData *pContainer = new TContainerData();
- wcsncpy(pContainer->m_wszName, name, CONTAINER_NAMELEN + 1);
+ wcsncpy_s(pContainer->m_wszName, name, _TRUNCATE);
AppendToContainerList(pContainer);
if (M.GetByte("limittabs", 0) && !mir_wstrcmp(name, L"default"))