rsx: Fix stupid overflow

This commit is contained in:
kd-11 2021-09-17 19:38:04 +03:00 committed by kd-11
parent ddec5d6908
commit c2ab3c664c

View File

@ -3377,8 +3377,8 @@ namespace rsx
auto scale_result = [](u32 value)
{
const auto scale = rsx::get_resolution_scale_percent();
const auto result = static_cast<u64>(value * 10000) / (scale * scale);
return std::max<u32>(1u, result);
const auto result = (value * 10000ull) / (scale * scale);
return std::max(1u, static_cast<u32>(result));
};
switch (type)