make sure a variable is local and doesn't accidentally get introduced to the global scope

This commit is contained in:
Preston Skupinski 2012-08-09 23:05:28 -04:00
parent 6ac0302401
commit 9c7b6c7e3c
1 changed files with 2 additions and 2 deletions

View File

@ -124,12 +124,12 @@ var cpu_lib = {
cpu.cycle_count+=4;
if(cpu.p.e||cpu.p.m) {
temp = (bytes[0] + value) & 0xff;
var temp = (bytes[0] + value) & 0xff;
cpu.p.n = temp >> 7;
cpu.mmu.store_byte(extra.memory_location, temp);
} else {
cpu.cycle_count+=2;
temp = (((bytes[1]<<8)|bytes[0]) + value) & 0xffff;
var temp = (((bytes[1]<<8)|bytes[0]) + value) & 0xffff;
cpu.p.n = temp >> 15;
cpu.mmu.store_word(extra.memory_location, temp);
}