[ox/model] Fix possible infinite recursion
This commit is contained in:
parent
a18c5d9294
commit
1f5c5a72ef
4
deps/ox/src/ox/model/typestore.hpp
vendored
4
deps/ox/src/ox/model/typestore.hpp
vendored
@ -58,8 +58,12 @@ class TypeStore {
|
|||||||
if (!std::is_constant_evaluated()) {
|
if (!std::is_constant_evaluated()) {
|
||||||
OX_REQUIRE_M(dt, loadDescriptor(typeId));
|
OX_REQUIRE_M(dt, loadDescriptor(typeId));
|
||||||
for (auto &f : dt->fieldList) {
|
for (auto &f : dt->fieldList) {
|
||||||
|
if (typeId == f.typeId) {
|
||||||
|
f.type = dt.get();
|
||||||
|
} else {
|
||||||
OX_RETURN_ERROR(this->getLoad(f.typeId).moveTo(f.type));
|
OX_RETURN_ERROR(this->getLoad(f.typeId).moveTo(f.type));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
auto &out = m_cache[typeId];
|
auto &out = m_cache[typeId];
|
||||||
out = std::move(dt);
|
out = std::move(dt);
|
||||||
return out.get();
|
return out.get();
|
||||||
|
Loading…
Reference in New Issue
Block a user