exidy.c: fixed an out-of-range access spot by gcc-4.9. [Jürgen Buchmüller]

beezer.c: fixed an out-of-range access spot by gcc-4.9. [Jürgen Buchmüller]
This commit is contained in:
Fabio Priuli 2013-03-25 16:28:57 +00:00
parent 3f3b479343
commit 4da603975e
2 changed files with 4 additions and 4 deletions

View File

@ -502,8 +502,8 @@ READ8_DEVICE_HANDLER( beezer_sh6840_r )
return 0;
/* offsets 2,4,6 read channel 0,1,2 MSBs and latch the LSB*/
case 2: case 4: case 6:
state->m_sh6840_LSB_latch = state->m_sh6840_timer[((offset<<1)-1)].counter.b.l;
return state->m_sh6840_timer[((offset<<1)-1)].counter.b.h;
state->m_sh6840_LSB_latch = state->m_sh6840_timer[((offset>>1)-1)].counter.b.l;
return state->m_sh6840_timer[((offset>>1)-1)].counter.b.h;
/* offsets 3,5,7 read the LSB latch*/
default: /* case 3,5,7 */
return state->m_sh6840_LSB_latch;

View File

@ -689,8 +689,8 @@ READ8_DEVICE_HANDLER( exidy_sh6840_r )
return 0;
/* offsets 2,4,6 read channel 0,1,2 MSBs and latch the LSB*/
case 2: case 4: case 6:
state->m_sh6840_LSB_latch = state->m_sh6840_timer[((offset<<1)-1)].counter.b.l;
return state->m_sh6840_timer[((offset<<1)-1)].counter.b.h;
state->m_sh6840_LSB_latch = state->m_sh6840_timer[((offset>>1)-1)].counter.b.l;
return state->m_sh6840_timer[((offset>>1)-1)].counter.b.h;
/* offsets 3,5,7 read the LSB latch*/
default: /* case 3,5,7 */
return state->m_sh6840_LSB_latch;