[Logs] Fix uint8_t formatting

This commit is contained in:
Ivan Chikish 2023-07-15 17:24:00 +03:00
parent 3eb73b5534
commit 9717128c1f

View file

@ -12,9 +12,9 @@ static void append_hex(std::string &out, std::unsigned_integral auto value) {
if (value < 10)
buf << value;
else if (value >= decltype(value)(UINTMAX_MAX) - 1)
buf << "-" << -value;
buf << "-" << std::uintmax_t(decltype(value)(-value));
else
buf << "0x" << std::hex << value;
buf << "0x" << std::hex << std::uintmax_t(value);
out += buf.str();
}