]> git.saurik.com Git - wxWidgets.git/commitdiff
open fstream with ios::binary flag to be compatible with wxFileStream and to avoid...
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 26 Aug 2005 22:52:29 +0000 (22:52 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 26 Aug 2005 22:52:29 +0000 (22:52 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35318 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/docview.cpp

index 4ca21c436eebb12769445fbb3144770cac471f80..bd6fa67c3d1b481e372f02b0fd379b66c17d471c 100644 (file)
@@ -571,7 +571,7 @@ bool wxDocument::DoSaveDocument(const wxString& file)
         msgTitle = wxString(_("File error"));
 
 #if wxUSE_STD_IOSTREAM
         msgTitle = wxString(_("File error"));
 
 #if wxUSE_STD_IOSTREAM
-    wxSTD ofstream store(file.mb_str());
+    wxSTD ofstream store(file.mb_str(), wxSTD ios::binary);
     if (store.fail() || store.bad())
 #else
     wxFileOutputStream store(file);
     if (store.fail() || store.bad())
 #else
     wxFileOutputStream store(file);
@@ -597,7 +597,7 @@ bool wxDocument::DoSaveDocument(const wxString& file)
 bool wxDocument::DoOpenDocument(const wxString& file)
 {
 #if wxUSE_STD_IOSTREAM
 bool wxDocument::DoOpenDocument(const wxString& file)
 {
 #if wxUSE_STD_IOSTREAM
-    wxSTD ifstream store(file.mb_str());
+    wxSTD ifstream store(file.mb_str(), wxSTD ios::binary);
     if (!store.fail() && !store.bad())
 #else
     wxFileInputStream store(file);
     if (!store.fail() && !store.bad())
 #else
     wxFileInputStream store(file);