Fix a "wrong this" bug in cpu6502 (#44)

This commit is contained in:
Ian Flanigan
2020-11-16 02:54:27 +01:00
committed by GitHub
parent 1e4e8381ec
commit f1b6c51ce7

View File

@@ -997,11 +997,12 @@ export default class CPU6502 {
mode: 'implied',
};
} else {
let cpu = this;
unk = {
name: '???',
op: function() {
debug('Unknown OpCode: ' + toHex(b) +
' at ' + toHex(this.pc - 1, 4));
' at ' + toHex(cpu.pc - 1, 4));
},
modeFn: this.implied,
mode: 'implied'