]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/fs_mem.cpp
Fix history in wxWebViewIE when using a custom file scheme.
[wxWidgets.git] / src / common / fs_mem.cpp
index 9cd5628f86cee4063583a3b131a1a8d66b11f36c..e306437de465ee11be4fbde3186805ad3ee035e0 100644 (file)
@@ -186,9 +186,13 @@ void wxMemoryFSHandlerBase::AddFileWithMimeType(const wxString& filename,
                                                 const wxString& textdata,
                                                 const wxString& mimetype)
 {
-    AddFileWithMimeType(filename,
-                        (const void*) textdata.mb_str(), textdata.length(),
-                        mimetype);
+    AddFileWithMimeType
+    (
+        filename,
+        static_cast<const char *>(textdata.To8BitData()),
+        wxStrlen(static_cast<const char *>(textdata.To8BitData())),
+        mimetype
+    );
 }
 
 
@@ -249,7 +253,7 @@ wxMemoryFSHandler::AddFile(const wxString& filename,
         return;
 
     wxMemoryOutputStream mems;
-    if ( image.Ok() && image.SaveFile(mems, type) )
+    if ( image.IsOk() && image.SaveFile(mems, type) )
     {
         m_Hash[filename] = new wxMemoryFSFile
                                (