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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user