diff --git a/src/ifcparse/IfcParse.cpp b/src/ifcparse/IfcParse.cpp index d9a9353dfc..125d2e2fd2 100644 --- a/src/ifcparse/IfcParse.cpp +++ b/src/ifcparse/IfcParse.cpp @@ -782,6 +782,8 @@ size_t IfcParse::IfcFile::load(unsigned entity_instance_name, const IfcParse::en filler.push_back(entity); } catch (IfcException& e) { Logger::Message(Logger::LOG_ERROR, e.what()); + // #4070 We didn't actually capture an aggregate entry, undo length increment. + return_value--; } } else { filler.push_back(new TokenArgument(next));