X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dc874fb4cebf75d39cc97210e0f4b6a35403e4a6..b53aea81d2e102224b452ef5bf7aee1132f37c6f:/src/common/log.cpp diff --git a/src/common/log.cpp b/src/common/log.cpp index d6041c195e..9f4134f41b 100644 --- a/src/common/log.cpp +++ b/src/common/log.cpp @@ -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);