git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43772
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#ifdef wxNEED_FPUTS
int wxFputs(const wchar_t *ws, FILE *stream)
{
+ wxCharBuffer buf(wxConvLibc.cWC2MB(ws));
+ if ( !buf )
+ return -1;
+
// counting the number of wide characters written isn't worth the trouble,
// simply distinguish between ok and error
- return fputs(wxConvLibc.cWC2MB(ws), stream) == -1 ? -1 : 0;
+ return fputs(buf, stream) == -1 ? -1 : 0;
}
#endif // wxNEED_FPUTS