From 4da603975ead3878e358babc19bde2c6d94304cc Mon Sep 17 00:00:00 2001 From: Fabio Priuli Date: Mon, 25 Mar 2013 16:28:57 +0000 Subject: [PATCH] =?UTF-8?q?exidy.c:=20fixed=20an=20out-of-range=20access?= =?UTF-8?q?=20spot=20by=20gcc-4.9.=20[J=C3=BCrgen=20Buchm=C3=BCller]=20bee?= =?UTF-8?q?zer.c:=20fixed=20an=20out-of-range=20access=20spot=20by=20gcc-4?= =?UTF-8?q?.9.=20[J=C3=BCrgen=20Buchm=C3=BCller]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mame/audio/beezer.c | 4 ++-- 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;