Added handling of return value

This commit is contained in:
Robert Osfield 2016-06-27 15:22:10 +01:00
parent 5c25a3a0ea
commit 3999a16a1a

View File

@ -797,7 +797,14 @@ bool Model::readOBJ(std::istream& fin, const osgDB::ReaderWriter::Options* optio
{
int smoothingGroup=0;
if (strncmp(line+2,"off",3)==0) smoothingGroup = 0;
else sscanf(line+2,"%d",&smoothingGroup);
else
{
int result = sscanf(line+2,"%d",&smoothingGroup);
if (result!=1)
{
OSG_NOTICE <<"*** error reading smoothing group ***"<<std::endl;
}
}
if (currentElementState.smoothingGroup != smoothingGroup)
{