IOP Counters: Silly error fixed.

-Coverity CID 152835 & 152834: The expression's value does not depend on the operands; often, this represents an inadvertent logic error.
In psxRcntWcount32(int, unsigned int): An operation with non-constant operands that computes a result with constant value (CWE-569)
This commit is contained in:
refractionpcsx2 2015-10-17 12:52:49 +01:00
parent 4f86cca306
commit 706bbcf8a9
1 changed files with 2 additions and 2 deletions

View File

@ -559,7 +559,7 @@ void psxRcntWcount16(int index, u16 value)
} }
psxCounters[index].count = value & 0xffff; psxCounters[index].count = value & 0xffff;
if ((psxCounters[index].mode & 0x400) == 1 || (psxCounters[index].mode & 0x40)) { if ((psxCounters[index].mode & 0x400) || (psxCounters[index].mode & 0x40)) {
psxCounters[index].target &= 0xffff; psxCounters[index].target &= 0xffff;
} }
if (value > psxCounters[index].target) {//Count already higher than Target if (value > psxCounters[index].target) {//Count already higher than Target
@ -588,7 +588,7 @@ void psxRcntWcount32(int index, u32 value)
} }
psxCounters[index].count = value; psxCounters[index].count = value;
if ((psxCounters[index].mode & 0x400) == 1 || (psxCounters[index].mode & 0x40)) { //IRQ not triggered (one shot) or toggle if ((psxCounters[index].mode & 0x400) || (psxCounters[index].mode & 0x40)) { //IRQ not triggered (one shot) or toggle
psxCounters[index].target &= 0xffffffff; psxCounters[index].target &= 0xffffffff;
} }
if (value > psxCounters[index].target) {//Count already higher than Target if (value > psxCounters[index].target) {//Count already higher than Target