]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/log.cpp
Fixed a VC6 warning (hopefully)
[wxWidgets.git] / src / common / log.cpp
index d6041c195e3561519e43bb47a8af3f23ddc052fc..9e64eaa9b8e0ec232edc6aa49a8d5ad6cdc4acfa 100644 (file)
@@ -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);