[ox/model] Fix infinite recursion caused by have a vector of the same type in ModelValue

This commit is contained in:
2023-12-22 19:44:04 -06:00
parent 80d0df2f46
commit ef6e3af735
5 changed files with 33 additions and 22 deletions

View File

@@ -147,7 +147,7 @@ Error OrganicClawReader::field(const char *key, T *val) noexcept {
if constexpr(isVector_v<T>) {
const auto &srcVal = value(key);
const auto srcSize = srcVal.size();
val->resize(srcSize);
oxReturnError(ox::resizeVector(*val, srcSize));
err = field(key, val->data(), val->size());
} else if constexpr(isArray_v<T>) {
const auto &srcVal = value(key);