sceNpTrophy: Minor UB fixup

id.data[9] is char while isprint should accept u8.
This commit is contained in:
Elad Ashkenazi 2023-07-26 16:28:09 +03:00
parent 9a5bdc9b4f
commit 106f31db6a

View File

@ -249,7 +249,8 @@ void fmt_class_string<SceNpCommunicationId>::format(std::string& out, u64 arg)
{ {
const auto& id = get_object(arg); const auto& id = get_object(arg);
fmt::append(out, "{ data='%s', term='%s' (0x%x), num=%d, dummy=%d }", id.data, std::isprint(id.data[9]) ? fmt::format("%c", id.data[9]) : "", id.data[9], id.num, id.dummy); const u8 term = id.data[9];
fmt::append(out, "{ data='%s', term='%s' (0x%x), num=%d, dummy=%d }", id.data, std::isprint(term) ? fmt::format("%c", term) : "", term, id.num, id.dummy);
} }
// Helpers // Helpers