X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8f1a82e6bbcd743abf9afff7e871f8324db567f3..c81394808bf7efd84e4294e44a9a9a7b7f6dd8a9:/src/common/fs_mem.cpp diff --git a/src/common/fs_mem.cpp b/src/common/fs_mem.cpp index 28b43e826f..3ad28089e6 100644 --- a/src/common/fs_mem.cpp +++ b/src/common/fs_mem.cpp @@ -186,15 +186,13 @@ void wxMemoryFSHandlerBase::AddFileWithMimeType(const wxString& filename, const wxString& textdata, const wxString& mimetype) { -#if wxUSE_UNICODE - const wxScopedCharBuffer data(textdata.To8BitData()); -#else - const wxString& data = textdata; -#endif - - AddFileWithMimeType(filename, - static_cast(data), data.length(), - mimetype); + AddFileWithMimeType + ( + filename, + static_cast(textdata.To8BitData()), + wxStrlen(static_cast(textdata.To8BitData())), + mimetype + ); }