Merge branch 'master' into patch-9

pull/4837/head
Kim Kulling 2022-12-15 14:05:35 +01:00 committed by GitHub
commit 2612950b7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -290,11 +290,12 @@ void OFFImporter::InternReadFile( const std::string& pFile, aiScene* pScene, IOS
sz = line; SkipSpaces(&sz); sz = line; SkipSpaces(&sz);
idx = strtoul10(sz,&sz); idx = strtoul10(sz,&sz);
if(!idx || idx > 9) { if(!idx || idx > 9) {
ASSIMP_LOG_ERROR("OFF: Faces with zero indices aren't allowed"); ASSIMP_LOG_ERROR("OFF: Faces with zero indices aren't allowed");
--mesh->mNumFaces; --mesh->mNumFaces;
++i;
continue; continue;
} }
faces->mNumIndices = idx; faces->mNumIndices = idx;
faces->mIndices = new unsigned int[faces->mNumIndices]; faces->mIndices = new unsigned int[faces->mNumIndices];
for (unsigned int m = 0; m < faces->mNumIndices;++m) { for (unsigned int m = 0; m < faces->mNumIndices;++m) {
SkipSpaces(&sz); SkipSpaces(&sz);