X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b1bc4b650063ce89740e831749d898c974c4fade..7528971e6bd0745f2e9f2234fc8e63235f0dba3a:/src/common/wxchar.cpp diff --git a/src/common/wxchar.cpp b/src/common/wxchar.cpp index f79bd0cbb8..962a705dcd 100644 --- a/src/common/wxchar.cpp +++ b/src/common/wxchar.cpp @@ -1222,9 +1222,13 @@ int WXDLLEXPORT wxSnprintf_(wxChar *buf, size_t len, const wxChar *format, ...) #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