From c2ab3c664c02e2dbc614ffea3d3f554cf9421c6b Mon Sep 17 00:00:00 2001 From: kd-11 Date: Fri, 17 Sep 2021 19:38:04 +0300 Subject: [PATCH] rsx: Fix stupid overflow --- rpcs3/Emu/RSX/RSXThread.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rpcs3/Emu/RSX/RSXThread.cpp b/rpcs3/Emu/RSX/RSXThread.cpp index 659a25fca1..a2bce9f1ef 100644 --- a/rpcs3/Emu/RSX/RSXThread.cpp +++ b/rpcs3/Emu/RSX/RSXThread.cpp @@ -3377,8 +3377,8 @@ namespace rsx auto scale_result = [](u32 value) { const auto scale = rsx::get_resolution_scale_percent(); - const auto result = static_cast(value * 10000) / (scale * scale); - return std::max(1u, result); + const auto result = (value * 10000ull) / (scale * scale); + return std::max(1u, static_cast(result)); }; switch (type)