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."

This commit is contained in:
Robert Osfield
2011-06-25 20:55:01 +00:00
parent a92241d40d
commit 125fa6d05d

View File

@@ -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;