Properly implement 'CCrashHandler::FormatFPU'

Fixes a bug causing decimal numbers to be displayed while negative numbers in register equals or exceeds one million.
This commit is contained in:
Kawe Mazidjatari 2023-04-08 13:34:31 +02:00
parent 4890593203
commit b089c59062

View File

@ -359,9 +359,9 @@ void CCrashHandler::FormatFPU(const CHAR* pszRegister, M128A* pxContent)
*reinterpret_cast<FLOAT*>(&nVec[3])));
const CHAR* pszVectorFormat = ", [%i, %i, %i, %i] ]\n";
LONG nHighest = static_cast<LONG>(*std::max_element(nVec, nVec + SDK_ARRAYSIZE(nVec)));
const LONG nHighest = abs(LONG(*MaxElementABS(std::begin(nVec), std::end(nVec))));
if (nHighest <= -1000000 || nHighest >= 1000000)
if (nHighest >= 1000000)
{
pszVectorFormat = ", [0x%08X, 0x%08X, 0x%08X, 0x%08X] ]\n";
m_svBuffer.append(Format(pszVectorFormat, nVec[0], nVec[1], nVec[2], nVec[3]));