From Byran Thrall, "The OpenFlight plugin doesn't handle unrecognized options or extra

whitespace in all cases, causing it to crash."
This commit is contained in:
Robert Osfield
2009-07-01 15:39:06 +00:00
parent af39672d3d
commit 2232bd5ee5

View File

@@ -163,6 +163,12 @@ ExportOptions::parseOptionsString()
setStripTextureFilePath( true );
continue;
}
// Protect against unrecognized options without values
if ( pos == str.npos )
{
osg::notify( osg::WARN ) << "fltexp: Bogus OptionString: " << token << std::endl;
continue;
}
// Not a Boolean/toggle. Must have a value.
// Get the value of the token, which could be double-quoted.