diff --git a/Source/Core/Core/CheatSearch.cpp b/Source/Core/Core/CheatSearch.cpp index 2f51c4f9e8..dd5e21ac7b 100644 --- a/Source/Core/Core/CheatSearch.cpp +++ b/Source/Core/Core/CheatSearch.cpp @@ -572,11 +572,19 @@ std::string Cheats::CheatSearchSession::GetResultValueAsString(size_t index, if (hex) { if constexpr (std::is_same_v) - return fmt::format("0x{0:08x}", Common::BitCast(m_search_results[index].m_value)); + { + return fmt::format("0x{0:08x}", Common::BitCast(m_search_results[index].m_value)); + } else if constexpr (std::is_same_v) - return fmt::format("0x{0:016x}", Common::BitCast(m_search_results[index].m_value)); + { + return fmt::format("0x{0:016x}", Common::BitCast(m_search_results[index].m_value)); + } else - return fmt::format("0x{0:0{1}x}", m_search_results[index].m_value, sizeof(T) * 2); + { + return fmt::format("0x{0:0{1}x}", + Common::BitCast>(m_search_results[index].m_value), + sizeof(T) * 2); + } } return fmt::format("{}", m_search_results[index].m_value);