GB Timer: Fix order-of-operations between & and +

This commit is contained in:
Vicki Pfau 2017-06-29 19:00:10 -07:00
parent 15243a6ae9
commit 32618a5b1d
1 changed files with 1 additions and 1 deletions

View File

@ -74,7 +74,7 @@ void GBTimerDivReset(struct GBTimer* timer) {
if (timer->internalDiv & (timer->timaPeriod >> 1)) {
++timer->p->memory.io[REG_TIMA];
if (!timer->p->memory.io[REG_TIMA]) {
mTimingSchedule(&timer->p->timing, &timer->irq, 4 - (timer->p->cpu->executionState + 1) & 3);
mTimingSchedule(&timer->p->timing, &timer->irq, 4 - ((timer->p->cpu->executionState + 1) & 3));
}
}
timer->p->memory.io[REG_DIV] = 0;