X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8907154c1a8a6882c6797d1f16393ddfb23e7f3a..afab8b85c4bdeb11a248c57d13e9bcfa14149ef8:/src/os2/fontenum.cpp diff --git a/src/os2/fontenum.cpp b/src/os2/fontenum.cpp index af3bd9ec78..c67015163a 100644 --- a/src/os2/fontenum.cpp +++ b/src/os2/fontenum.cpp @@ -1,10 +1,9 @@ /////////////////////////////////////////////////////////////////////////////// -// Name: msw/fontenum.cpp +// Name: src/os2/fontenum.cpp // Purpose: wxFontEnumerator class for Windows // Author: Julian Smart // Modified by: David Webster to add support for font encodings // Created: 01/03/00 -// RCS-ID: $Id$ // Copyright: (c) Julian Smart // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -22,11 +21,12 @@ #if wxUSE_FONTMAP +#include "wx/fontenum.h" + #ifndef WX_PRECOMP - #include "wx/font.h" + #include "wx/font.h" #endif -#include "wx/fontenum.h" #include "wx/fontmap.h" #include "wx/encinfo.h" @@ -119,7 +119,7 @@ void wxFontEnumeratorHelper::DoEnumerate() #ifdef __WIN32__ LOGFONT lf; lf.lfCharSet = m_charset; - wxStrncpy(lf.lfFaceName, m_facename, WXSIZEOF(lf.lfFaceName)); + wxStrlcpy(lf.lfFaceName, m_facename, WXSIZEOF(lf.lfFaceName)); lf.lfPitchAndFamily = 0; ::EnumFontFamiliesEx(hDC, &lf, (wxFONTENUMPROC)wxFontEnumeratorProc, (LPARAM)this, 0) ;