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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

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'