Skip to content

Commit

Permalink
Merge pull request #1825 from johnbaumann/interrupt_cycle_cast
Browse files Browse the repository at this point in the history
Fix 64-bit cast in interrupt scheduler
  • Loading branch information
johnbaumann authored Dec 31, 2024
2 parents 0c477c3 + a747a7c commit 0ae9d37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/r3000a.h
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ class R3000Acpu {
void scheduleInterrupt(unsigned interrupt, uint32_t eCycle) {
PSXIRQ_LOG("Scheduling interrupt %08x at %08x\n", interrupt, eCycle);
const uint64_t cycle = m_regs.cycle;
uint64_t target = uint64_t(cycle + eCycle * m_interruptScales[interrupt]);
uint64_t target = cycle + uint64_t(eCycle * m_interruptScales[interrupt]);
m_regs.interrupt |= (1 << interrupt);
m_regs.intTargets[interrupt] = target;
int64_t lowest = m_regs.lowestTarget - cycle;
Expand Down

0 comments on commit 0ae9d37

Please sign in to comment.