From 2c69d3a685a47f4870aa9dd908b46b9d2e3b4b07 Mon Sep 17 00:00:00 2001 From: Christian Seiler Date: Sat, 30 May 2026 09:35:22 +0200 Subject: [PATCH] C++: fix bug in serialization code (doesn't request correct version for CurrentTimeElement) --- cpp/src/monoformat_structured.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cpp/src/monoformat_structured.cpp b/cpp/src/monoformat_structured.cpp index 5db1097..185952a 100644 --- a/cpp/src/monoformat_structured.cpp +++ b/cpp/src/monoformat_structured.cpp @@ -1899,7 +1899,11 @@ ElementType CurrentTimeElement::elementType() const { } std::uint32_t CurrentTimeElement::minimumFormatVersion() const { - return 1; + if (static_cast(m_textFlags) != 0) { + return 2; + } else { + return 1; + } } std::size_t CurrentTimeElement::serializeTo(std::span target, std::uint32_t formatVersion) const {