don't forget to output new line in wxMessageOutputStderr::Output() even if conversion to multibyte fails

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54373 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2008-06-26 11:49:25 +00:00
parent 831b64f32f
commit 7f173c3349

View File

@ -140,12 +140,13 @@ wxString wxMessageOutputStderr::AppendLineFeedIfNeeded(const wxString& str)
void wxMessageOutputStderr::Output(const wxString& str)
{
const wxWX2MBbuf buf = AppendLineFeedIfNeeded(str).mb_str();
const wxString strWithLF = AppendLineFeedIfNeeded(str);
const wxWX2MBbuf buf = strWithLF.mb_str();
if ( buf )
fprintf(stderr, "%s", (const char*) buf);
else // print at least something
fprintf(stderr, "%s", (const char*) str.ToAscii());
fprintf(stderr, "%s", (const char*) strWithLF.ToAscii());
}
// ----------------------------------------------------------------------------