X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9a958328220b25226d259e43791eee4b06fe86ef..b85b06e13d22e7fc1604ec1a49caa1227a1b3d36:/src/msw/crashrpt.cpp diff --git a/src/msw/crashrpt.cpp b/src/msw/crashrpt.cpp index d2a303abbe..2b0e276cef 100644 --- a/src/msw/crashrpt.cpp +++ b/src/msw/crashrpt.cpp @@ -245,14 +245,13 @@ bool wxCrashReportImpl::Generate(int flags, EXCEPTION_POINTERS *ep) // ---------------------------------------------------------------------------- /* static */ -void wxCrashReport::SetFileName(const wxChar *filename) +void wxCrashReport::SetFileName(const wxString& filename) { - wxStrncpy(gs_reportFilename, filename, WXSIZEOF(gs_reportFilename) - 1); - gs_reportFilename[WXSIZEOF(gs_reportFilename) - 1] = _T('\0'); + wxStrlcpy(gs_reportFilename, filename.wx_str(), WXSIZEOF(gs_reportFilename)); } /* static */ -const wxChar *wxCrashReport::GetFileName() +wxString wxCrashReport::GetFileName() { return gs_reportFilename; }