eeRec: Fixed Negative array index write

-Coverity CID 146868: In R5900::​Dynarec::​OpcodeImpl::​recWritebackHILOMMX(int, int, int, int): Negative value used to index an array in a write operation (CWE-129)
This commit is contained in:
refractionpcsx2 2015-10-04 14:12:45 +01:00
parent 5b4eb65e68
commit 99095c0529
1 changed files with 2 additions and 2 deletions

View File

@ -223,9 +223,9 @@ void recWritebackHILOMMX(int info, int regsource, int writed, int upper)
reghi = _checkXMMreg(XMMTYPE_GPRREG, XMMGPR_HI, MODE_READ); reghi = _checkXMMreg(XMMTYPE_GPRREG, XMMGPR_HI, MODE_READ);
if( reghi >= 0 ) { if( reghi >= 0 ) {
if( xmmregs[reghi].mode & MODE_WRITE ) SSE2_MOVQ_XMM_to_M64(hiaddr-8, reghi); if( xmmregs[reghi].mode & MODE_WRITE ) SSE2_MOVQ_XMM_to_M64(hiaddr-8, reghi);
xmmregs[reghi].inuse = 0;
} }
xmmregs[reghi].inuse = 0;
MOVQRtoM(hiaddr, mmreg); MOVQRtoM(hiaddr, mmreg);
} }
else { else {