X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9a83f860948059b0273b5cc6d9e43fadad3ebfca..f050bdbd5b69ed1a6752102f0c4c13bc7cb4ed3c:/src/common/file.cpp diff --git a/src/common/file.cpp b/src/common/file.cpp index 1063e45293..2b837569a2 100644 --- a/src/common/file.cpp +++ b/src/common/file.cpp @@ -312,7 +312,12 @@ bool wxFile::Write(const wxString& s, const wxMBConv& conv) if ( !buf ) return false; - const size_t size = strlen(buf); // FIXME: use buf.length() when available +#if wxUSE_UNICODE + const size_t size = buf.length(); +#else + const size_t size = s.length(); +#endif + return Write(buf, size) == size; }