From 125fa6d05d0c0d8be0d3d06404803b5065fd465a Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Sat, 25 Jun 2011 20:55:01 +0000 Subject: [PATCH] Merged from svn/trunk changeset 12656. 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;