[ox/model] Fix possible infinite recursion
All checks were successful
Build / build (push) Successful in 3m26s

This commit is contained in:
Gary Talent 2025-01-23 23:46:42 -06:00
parent e40b11246d
commit 7e3e046109

View File

@ -58,7 +58,11 @@ class TypeStore {
if (!std::is_constant_evaluated()) {
OX_REQUIRE_M(dt, loadDescriptor(typeId));
for (auto &f : dt->fieldList) {
OX_RETURN_ERROR(this->getLoad(f.typeId).moveTo(f.type));
if (typeId == f.typeId) {
f.type = dt.get();
} else {
OX_RETURN_ERROR(this->getLoad(f.typeId).moveTo(f.type));
}
}
auto &out = m_cache[typeId];
out = std::move(dt);