mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
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:
parent
4890593203
commit
b089c59062
@ -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]));
|
||||
|
Loading…
x
Reference in New Issue
Block a user