X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/766aecab3a30f6038477943790bf34e0ab91e286..6362d82b3ed82aa6795e4ad03160820f94c9e4d4:/src/common/log.cpp diff --git a/src/common/log.cpp b/src/common/log.cpp index 9cdf13a271..9e64eaa9b8 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.wx_str(), title.wx_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); @@ -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);