From 14ff7a5992895f774b894adeaa6153de00403258 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 12 Nov 2006 21:52:46 +0000 Subject: [PATCH] use wxFputs(s) instead of puts(s.mb_str()) to avoid crashes when conversion fails (see bug 1591388) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43376 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/log.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/log.cpp b/src/common/log.cpp index c59af3cb3f..a42d6aaf89 100644 --- a/src/common/log.cpp +++ b/src/common/log.cpp @@ -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