From ea7ccf40b1da012109ba5ad4d204d125ef10ac6c Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Sun, 4 Dec 2022 01:48:56 -0600 Subject: [PATCH] [ox/model] Fix null ptr use when describing nested Vectors --- deps/ox/src/ox/model/descwrite.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deps/ox/src/ox/model/descwrite.hpp b/deps/ox/src/ox/model/descwrite.hpp index 84f3f4f5..f4a8470a 100644 --- a/deps/ox/src/ox/model/descwrite.hpp +++ b/deps/ox/src/ox/model/descwrite.hpp @@ -39,7 +39,7 @@ template constexpr int indirectionLevels_v = 1 + indirectionLevels_v; template -constexpr int indirectionLevels_v<::ox::Vector> = 1 + indirectionLevels_v; +constexpr int indirectionLevels_v<::ox::Vector> = 1 + indirectionLevels_v; template constexpr auto buildSubscriptStack(const T*, SubscriptStack*) noexcept { @@ -246,7 +246,7 @@ constexpr Error TypeDescWriter::fieldCString(CRStringView name, Args&&...) noexc template constexpr const DescriptorType *TypeDescWriter::type(const T *val) const noexcept { if constexpr(isVector_v) { - return type(val->data()); + return type(static_cast(nullptr)); } else { auto [t, err] = m_typeStore->template get(); if (!err) {