Fix undefined behavior in C++20, see #4735
This commit is contained in:
parent
09e7a38c52
commit
dcdc66b8f5
@ -832,7 +832,8 @@ namespace StringUtils
|
|||||||
if (utf32[i] >= 128 || utf32[i] == '&' || utf32[i] == '<' ||
|
if (utf32[i] >= 128 || utf32[i] == '&' || utf32[i] == '<' ||
|
||||||
utf32[i] == '>' || utf32[i] == '\"' || utf32[i] == ' ')
|
utf32[i] == '>' || utf32[i] == '\"' || utf32[i] == ' ')
|
||||||
{
|
{
|
||||||
output << "&#x" << std::hex << std::uppercase << utf32[i] << ";";
|
unsigned code = (unsigned)utf32[i];
|
||||||
|
output << "&#x" << std::hex << std::uppercase << code << ";";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user