Commit 349afb99 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Fixed bug in File - file mode has to be binary

On Windows, the standard library translated all LF bytes in the binary
stream to CR+LF...

Thanks to Vítek ;)
parent 4c52f750
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -44,9 +44,9 @@ bool File :: open( const String& fileName,
         std::cout << " for writing ... " << std::endl;
   }
   if( mode == IOMode::read )
      file = std::fopen( fileName.getString(), "r" );
      file = std::fopen( fileName.getString(), "rb" );
   if( mode == IOMode::write )
      file = std::fopen( fileName.getString(), "w" );
      file = std::fopen( fileName.getString(), "wb" );
   if( file ==  NULL )
   {
      std::cerr << "I am not able to open the file " << fileName << ". ";