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
This commit is contained in:
Robin Ole Heinemann 2024-10-09 14:07:37 +02:00 committed by Catherine
parent 038e262332
commit a761999579
1 changed files with 1 additions and 1 deletions

View File

@ -1127,7 +1127,7 @@ struct fmt_part {
}
case UNICHAR: {
uint32_t codepoint = val.template get<uint32_t>();
uint32_t codepoint = val.template zcast<32>().template get<uint32_t>();
if (codepoint >= 0x10000)
buf += (char)(0xf0 | (codepoint >> 18));
else if (codepoint >= 0x800)