diff options
author | aliaspider | 2014-12-07 20:31:38 +0100 |
---|---|---|
committer | aliaspider | 2014-12-07 20:31:38 +0100 |
commit | c1823bf865fd8c36521112fa20747ec417a75f86 (patch) | |
tree | f340d628d7c41d4aea9e557718eb7860291a6364 | |
parent | 6017ba80d41ebe044721a2190862c0ba54303f02 (diff) | |
download | snesemu-c1823bf865fd8c36521112fa20747ec417a75f86.tar.gz snesemu-c1823bf865fd8c36521112fa20747ec417a75f86.tar.bz2 snesemu-c1823bf865fd8c36521112fa20747ec417a75f86.zip |
fix a bug in apu_blarrg.c when compiled with aggressive-loop-
produce bad code when accessing an array with an out-of-bounds index.
-rw-r--r-- | source/apu_blargg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/apu_blargg.c b/source/apu_blargg.c index b1bb258..0a1c334 100644 --- a/source/apu_blargg.c +++ b/source/apu_blargg.c @@ -1610,7 +1610,7 @@ static void spc_cpu_write( int data, int addr, int time ) else { *(&(m.ram.ram[0]) + reg + ROM_ADDR) = CPU_PAD_FILL; /* restore overwritten padding */ - spc_cpu_write( data, reg + ROM_ADDR - 0x10000, time ); + spc_cpu_write( data, addr & 0xFFFF, time ); } } } |