aboutsummaryrefslogtreecommitdiff
path: root/src/cpu/cpu.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/cpu.ts')
-rw-r--r--src/cpu/cpu.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cpu/cpu.ts b/src/cpu/cpu.ts
index fb98786..e7a2544 100644
--- a/src/cpu/cpu.ts
+++ b/src/cpu/cpu.ts
@@ -186,7 +186,7 @@ export class CPU implements ICPU {
}
updateClockEvent(callback: AVRClockEventCallback, cycles: number) {
- const entry = this.clockEvents.find((item) => (item.callback = callback));
+ const entry = this.clockEvents.find((item) => item.callback === callback);
if (entry) {
entry.cycles = this.cycles + Math.max(1, cycles);
this.updateClockEvents();
@@ -196,7 +196,7 @@ export class CPU implements ICPU {
}
clearClockEvent(callback: AVRClockEventCallback) {
- const index = this.clockEvents.findIndex((item) => (item.callback = callback));
+ const index = this.clockEvents.findIndex((item) => item.callback === callback);
if (index >= 0) {
this.clockEvents.splice(index, 1);
this.updateClockEvents();