From 3979eb7755b67ca455729eccbd9d2213ad1560af Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sat, 25 Jun 2011 20:51:58 +0000 Subject: [PATCH] From Andreas Eskland, "I found that a binary PNM file couldn't be read by the PNM plugin in the 3.0 branch. Attached is a small fix in ReaderWriterPNM.cpp, simply opening the file in binary mode." --- src/osgPlugins/pnm/ReaderWriterPNM.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osgPlugins/pnm/ReaderWriterPNM.cpp b/src/osgPlugins/pnm/ReaderWriterPNM.cpp index 5da6bb9f6..adb99009b 100644 --- a/src/osgPlugins/pnm/ReaderWriterPNM.cpp +++ b/src/osgPlugins/pnm/ReaderWriterPNM.cpp @@ -383,7 +383,7 @@ class ReaderWriterPNM : public osgDB::ReaderWriter std::string fileName = osgDB::findDataFile( file, options ); if (fileName.empty()) return ReadResult::FILE_NOT_FOUND; - std::ifstream fin(fileName.c_str()); + std::ifstream fin(fileName.c_str(), std::ios_base::in | std::ios_base::binary); if (!fin.good()) return ReadResult::ERROR_IN_READING_FILE;