X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fe267c2fad7b47d09da3985702813bed7387870c..aea5b1c1bda2cee29d8428028d81272ae9fa048d:/src/msw/crashrpt.cpp diff --git a/src/msw/crashrpt.cpp b/src/msw/crashrpt.cpp index 795e7f6f02..2b0e276cef 100644 --- a/src/msw/crashrpt.cpp +++ b/src/msw/crashrpt.cpp @@ -247,8 +247,7 @@ bool wxCrashReportImpl::Generate(int flags, EXCEPTION_POINTERS *ep) /* static */ void wxCrashReport::SetFileName(const wxString& filename) { - wxStrncpy(gs_reportFilename, filename.c_str(), WXSIZEOF(gs_reportFilename) - 1); - gs_reportFilename[WXSIZEOF(gs_reportFilename) - 1] = _T('\0'); + wxStrlcpy(gs_reportFilename, filename.wx_str(), WXSIZEOF(gs_reportFilename)); } /* static */