]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/font.cpp
remove incorrect cast of wxString to char* (unnecessary and breaks wxUSE_STL build)
[wxWidgets.git] / src / msw / font.cpp
index 911cfd84b5dadec0cd0effb281ad9e321b7f8ea4..ed8728be509a700253436f4bbfbfd800f3a05f7d 100644 (file)
@@ -618,9 +618,7 @@ void wxNativeFontInfo::SetUnderlined(bool underlined)
 
 bool wxNativeFontInfo::SetFaceName(const wxString& facename)
 {
-    size_t len = WXSIZEOF(lf.lfFaceName);
-    wxStrncpy(lf.lfFaceName, facename, len);
-    lf.lfFaceName[len - 1] = '\0';    // truncate the face name
+    wxStrlcpy(lf.lfFaceName, facename.c_str(), WXSIZEOF(lf.lfFaceName));
     return true;
 }