Commit 42073c59 authored by Isaak Lim's avatar Isaak Lim
Browse files

now binary OFF files should be read correctly under windows

refs #1222

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@15730 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 5b5da4e7
......@@ -272,7 +272,7 @@ bool FileOFFPlugin::readFileOptions(QString _filename, OFFImporter& _importer) {
const unsigned int LINE_LEN = 4096;
std::ifstream ifs(_filename.toUtf8());
std::ifstream ifs(_filename.toUtf8(), std::ios_base::binary);
if ( (!ifs.is_open()) || (!ifs.good())) {
......@@ -1232,7 +1232,8 @@ bool FileOFFPlugin::saveObject(int _id, QString _filename)
std::string filename = std::string( _filename.toUtf8() );
std::fstream ofs( filename.c_str(), std::ios_base::out );
bool binary = userWriteOptions_ & OFFImporter::BINARY;
std::fstream ofs( filename.c_str(), (binary ? std::ios_base::out | std::ios_base::binary : std::ios_base::out));
if (!ofs) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment