From a761999579c64aab33f359e1c02b02518959361b Mon Sep 17 00:00:00 2001 From: Robin Ole Heinemann Date: Wed, 9 Oct 2024 14:07:37 +0200 Subject: [PATCH] cxxrtl: fix formatting of UNICHAR This caused compilation to fail when the argument of any, not just UNICHAR formatting operations, is bigger than 32 bits. Fixes #4644 --- backends/cxxrtl/runtime/cxxrtl/cxxrtl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backends/cxxrtl/runtime/cxxrtl/cxxrtl.h b/backends/cxxrtl/runtime/cxxrtl/cxxrtl.h index d1d6bd8dc..9634b833b 100644 --- a/backends/cxxrtl/runtime/cxxrtl/cxxrtl.h +++ b/backends/cxxrtl/runtime/cxxrtl/cxxrtl.h @@ -1127,7 +1127,7 @@ struct fmt_part { } case UNICHAR: { - uint32_t codepoint = val.template get(); + uint32_t codepoint = val.template zcast<32>().template get(); if (codepoint >= 0x10000) buf += (char)(0xf0 | (codepoint >> 18)); else if (codepoint >= 0x800)