Merge pull request #1512 from aavenel/safe_atoi_OBJ
Raise exception when obj file contains invalid face indicepull/1503/head^2
commit
6d98f82440
|
@ -475,7 +475,11 @@ void ObjFileParser::getFace( aiPrimitiveType type ) {
|
|||
} else {
|
||||
reportErrorTokenInFace();
|
||||
}
|
||||
} else {
|
||||
//On error, std::atoi will return 0 which is not a valid value
|
||||
throw DeadlyImportError("OBJ: Invalid face indice");
|
||||
}
|
||||
|
||||
}
|
||||
m_DataIt += iStep;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue