From 4cc34e384c7410ebf0317733d474bfab8f28dcad Mon Sep 17 00:00:00 2001 From: Sean McGovern Date: Tue, 11 May 2021 23:02:23 -0400 Subject: [PATCH] CPUDetect: saturate lower bound of CPU count to 1 --- Common/CPUDetect.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Common/CPUDetect.cpp b/Common/CPUDetect.cpp index 325ada59ac..e5bc722af9 100644 --- a/Common/CPUDetect.cpp +++ b/Common/CPUDetect.cpp @@ -396,7 +396,7 @@ void CPUInfo::Detect() { } // This seems to be the count per core. Hopefully all cores are the same, but we counted each above. - logical_cpu_count /= std::max(num_cores, 1); + std::max(logical_cpu_count /= std::max(num_cores, 1), 1); #elif PPSSPP_PLATFORM(MAC) int num = 0; size_t sz = sizeof(num);