X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c6867dcd5110058c0e63a8de5f05fdc139c18129..5bca8be2cf427f9f7f79212ca086bf715085f7f9:/src/common/log.cpp diff --git a/src/common/log.cpp b/src/common/log.cpp index 432ad55f1f..9f4134f41b 100644 --- a/src/common/log.cpp +++ b/src/common/log.cpp @@ -183,7 +183,7 @@ IMPLEMENT_LOG_FUNCTION(Status) void wxSafeShowMessage(const wxString& title, const wxString& text) { #ifdef __WINDOWS__ - ::MessageBox(NULL, text.c_str(), title.c_str(), MB_OK | MB_ICONSTOP); + ::MessageBox(NULL, text.t_str(), title.t_str(), MB_OK | MB_ICONSTOP); #else wxFprintf(stderr, wxS("%s: %s\n"), title.c_str(), text.c_str()); fflush(stderr); @@ -969,7 +969,7 @@ unsigned int wxLog::ms_prevCounter = 0; time_t wxLog::ms_prevTimeStamp= 0; wxLogLevel wxLog::ms_prevLevel; -wxLog *wxLog::ms_pLogger = (wxLog *)NULL; +wxLog *wxLog::ms_pLogger = NULL; bool wxLog::ms_doLog = true; bool wxLog::ms_bAutoCreate = true; bool wxLog::ms_bVerbose = false; @@ -1068,8 +1068,7 @@ const wxChar *wxSysErrorMsg(unsigned long nErrCode) #if !defined(__SMARTPHONE__) /* of WinCE */ if( lpMsgBuf != 0 ) { - wxStrncpy(s_szBuf, (const wxChar *)lpMsgBuf, WXSIZEOF(s_szBuf) - 1); - s_szBuf[WXSIZEOF(s_szBuf) - 1] = wxS('\0'); + wxStrlcpy(s_szBuf, (const wxChar *)lpMsgBuf, WXSIZEOF(s_szBuf)); LocalFree(lpMsgBuf);