X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dca0f651782d5c2659203c97b3243f613966998d..fcdd53359135f790b85728c4254b97095a56dad8:/src/msw/fontenum.cpp?ds=sidebyside diff --git a/src/msw/fontenum.cpp b/src/msw/fontenum.cpp index 8ec371ae8c..fe70af5e6b 100644 --- a/src/msw/fontenum.cpp +++ b/src/msw/fontenum.cpp @@ -166,7 +166,7 @@ void wxFontEnumeratorHelper::DoEnumerate() #else // __WIN32__ LOGFONT lf; lf.lfCharSet = (BYTE)m_charset; - wxStrncpy(lf.lfFaceName, m_facename, WXSIZEOF(lf.lfFaceName)); + wxStrlcpy(lf.lfFaceName, m_facename.c_str(), WXSIZEOF(lf.lfFaceName)); lf.lfPitchAndFamily = 0; ::EnumFontFamiliesEx(hDC, &lf, (wxFONTENUMPROC)wxFontEnumeratorProc, (LPARAM)this, 0 /* reserved */) ;