mirror of https://github.com/YosysHQ/yosys.git
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:
parent
038e262332
commit
a761999579
|
@ -1127,7 +1127,7 @@ struct fmt_part {
|
||||||
}
|
}
|
||||||
|
|
||||||
case UNICHAR: {
|
case UNICHAR: {
|
||||||
uint32_t codepoint = val.template get<uint32_t>();
|
uint32_t codepoint = val.template zcast<32>().template get<uint32_t>();
|
||||||
if (codepoint >= 0x10000)
|
if (codepoint >= 0x10000)
|
||||||
buf += (char)(0xf0 | (codepoint >> 18));
|
buf += (char)(0xf0 | (codepoint >> 18));
|
||||||
else if (codepoint >= 0x800)
|
else if (codepoint >= 0x800)
|
||||||
|
|
Loading…
Reference in New Issue