]> git.saurik.com Git - wxWidgets.git/commitdiff
use wxFputs(s) instead of puts(s.mb_str()) to avoid crashes when conversion fails...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 12 Nov 2006 21:52:46 +0000 (21:52 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 12 Nov 2006 21:52:46 +0000 (21:52 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43376 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/log.cpp

index c59af3cb3ff40461df363cfdb0b5f75ed4b365e4..a42d6aaf893cbb268476fe5e78502cbcbea05770 100644 (file)
@@ -555,8 +555,8 @@ void wxLogStderr::DoLogString(const wxChar *szString, time_t WXUNUSED(t))
     TimeStamp(&str);
     str << szString;
 
-    fputs(str.mb_str(), m_fp);
-    fputc(_T('\n'), m_fp);
+    wxFputs(str, m_fp);
+    wxFputc(_T('\n'), m_fp);
     fflush(m_fp);
 
     // under GUI systems such as Windows or Mac, programs usually don't have