X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a1b806b98241ab649c169aaa1f134df85e80fb8b..d485bda109d5ef0fef36a3f737549e9b9f54baab:/src/common/fs_mem.cpp?ds=sidebyside diff --git a/src/common/fs_mem.cpp b/src/common/fs_mem.cpp index e306437de4..5f96257100 100644 --- a/src/common/fs_mem.cpp +++ b/src/common/fs_mem.cpp @@ -186,13 +186,9 @@ void wxMemoryFSHandlerBase::AddFileWithMimeType(const wxString& filename, const wxString& textdata, const wxString& mimetype) { - AddFileWithMimeType - ( - filename, - static_cast(textdata.To8BitData()), - wxStrlen(static_cast(textdata.To8BitData())), - mimetype - ); + const wxCharBuffer buf(textdata.To8BitData()); + + AddFileWithMimeType(filename, buf.data(), buf.length(), mimetype); }