X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/48a1108eb87970373e1b1d5debeeaedd8d1916ea..8626e0b73de21463908bf855700c31e41c661b30:/src/os2/fontenum.cpp

diff --git a/src/os2/fontenum.cpp b/src/os2/fontenum.cpp
index 1af60107aa..fdb1f4af11 100644
--- a/src/os2/fontenum.cpp
+++ b/src/os2/fontenum.cpp
@@ -120,7 +120,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) ;