From dba31d2cd953c0759315b527b6f3f29fb640ee24 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Tue, 7 Feb 2023 23:19:18 -0600 Subject: [PATCH] [ox/model] Fix ModelUnion to copy type on copy and move --- deps/ox/src/ox/model/modelvalue.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/deps/ox/src/ox/model/modelvalue.hpp b/deps/ox/src/ox/model/modelvalue.hpp index dd88bb64..fb202ead 100644 --- a/deps/ox/src/ox/model/modelvalue.hpp +++ b/deps/ox/src/ox/model/modelvalue.hpp @@ -532,12 +532,14 @@ class ModelUnion { m_fields[field->name] = field.get(); ++i; } + m_type = other.m_type; m_unionIdx = other.m_unionIdx; } constexpr ModelUnion(ModelUnion &&other) noexcept { m_fieldsOrder = std::move(other.m_fieldsOrder); m_fields = std::move(other.m_fields); + m_type = other.m_type; m_unionIdx = other.m_unionIdx; }