]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed another 2 instances of wxStrncpy bug
authorVáclav Slavík <vslavik@fastmail.fm>
Thu, 27 Dec 2001 23:16:30 +0000 (23:16 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Thu, 27 Dec 2001 23:16:30 +0000 (23:16 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13203 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/fontutil.cpp

index 9b61937b170462ae4c2f5f39fde9976345977259..dc7d1bd496897540620b1667b61384af8ace8719 100644 (file)
@@ -202,7 +202,7 @@ bool wxTestFontEncoding(const wxNativeEncodingInfo& info)
     wxZeroMemory(lf);       // all default values
 
     lf.lfCharSet = info.charset;
-    wxStrncpy(lf.lfFaceName, info.facename, sizeof(lf.lfFaceName));
+    wxStrncpy(lf.lfFaceName, info.facename, WXSIZEOF(lf.lfFaceName));
 
     HFONT hfont = ::CreateFontIndirect(&lf);
     if ( !hfont )