X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a1b806b98241ab649c169aaa1f134df85e80fb8b..c80d4c1e207b0011db61cb2ce1cc8babe8e54582:/src/common/fs_mem.cpp diff --git a/src/common/fs_mem.cpp b/src/common/fs_mem.cpp index e306437de4..281cdbbc88 100644 --- a/src/common/fs_mem.cpp +++ b/src/common/fs_mem.cpp @@ -2,7 +2,6 @@ // Name: src/common/fs_mem.cpp // Purpose: in-memory file system // Author: Vaclav Slavik -// RCS-ID: $Id$ // Copyright: (c) 2000 Vaclav Slavik // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -186,13 +185,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); }