Explorar o código

Merge pull request #5138 from sashashura/4709035804065792

Fix UNKNOWN WRITE in Assimp::SortByPTypeProcess::Execute
Kim Kulling %!s(int64=2) %!d(string=hai) anos
pai
achega
3939d35f18
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      code/AssetLib/OFF/OFFLoader.cpp

+ 1 - 1
code/AssetLib/OFF/OFFLoader.cpp

@@ -284,7 +284,7 @@ void OFFImporter::InternReadFile( const std::string& pFile, aiScene* pScene, IOS
     for (unsigned int i = 0; i < numFaces; ) {
     for (unsigned int i = 0; i < numFaces; ) {
         if(!GetNextLine(buffer,line)) {
         if(!GetNextLine(buffer,line)) {
             ASSIMP_LOG_ERROR("OFF: The number of faces in the header is incorrect");
             ASSIMP_LOG_ERROR("OFF: The number of faces in the header is incorrect");
-            break;
+            throw DeadlyImportError("OFF: The number of faces in the header is incorrect");
         }
         }
         unsigned int idx;
         unsigned int idx;
         sz = line; SkipSpaces(&sz);
         sz = line; SkipSpaces(&sz);