- Game-Music-Emu: Merge commit 6e1544d.

Commit title: 'Fix undefined left-shift of signed int.'
This commit is contained in:
Edoardo Prezioso 2016-12-16 21:27:34 +01:00 committed by Christoph Oelckers
parent 8895716e27
commit f239c0ea05

View file

@ -433,9 +433,7 @@ void Snes_Spc::cpu_write( int data, int addr, rel_time_t time )
#endif
// Registers other than $F2 and $F4-$F7
//if ( reg != 2 && reg != 4 && reg != 5 && reg != 6 && reg != 7 )
// TODO: this is a bit on the fragile side
if ( ((~0x2F00 << (bits_in_int - 16)) << reg) < 0 ) // 36%
if ( reg != 2 && (reg < 4 || reg > 7) ) // 36%
cpu_write_smp_reg( data, time, reg );
}
// High mem/address wrap-around