diff options
author | Fabio Priuli <etabeta78@users.noreply.github.com> | 2013-03-25 16:28:57 +0000 |
---|---|---|
committer | Fabio Priuli <etabeta78@users.noreply.github.com> | 2013-03-25 16:28:57 +0000 |
commit | 4da603975ead3878e358babc19bde2c6d94304cc (patch) | |
tree | 241f4cc98ce6c234928320672c6c952343ff6088 /src | |
parent | 3f3b4793432a9445e01fa0ba8e4c8ae6d9aca93d (diff) |
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]
Diffstat (limited to 'src')
-rw-r--r-- | src/mame/audio/beezer.c | 4 | ||||
-rw-r--r-- | src/mame/audio/exidy.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/mame/audio/beezer.c b/src/mame/audio/beezer.c index 0b8cce14277..154143058b7 100644 --- a/src/mame/audio/beezer.c +++ b/src/mame/audio/beezer.c @@ -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; diff --git a/src/mame/audio/exidy.c b/src/mame/audio/exidy.c index 1bdc4ccf2e1..ad24f95c733 100644 --- a/src/mame/audio/exidy.c +++ b/src/mame/audio/exidy.c @@ -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; |