(MESS) x68k, vboy : fixed reported buffer overflow

This commit is contained in:
Robbbert 2014-02-27 08:26:27 +00:00
parent 12ca48c3c1
commit 13ff216364
2 changed files with 5 additions and 3 deletions

View File

@ -481,6 +481,7 @@ WRITE8_MEMBER( vboysnd_device::write )
break; break;
case SxEV0: case SxEV0:
if (channel < 5)
if (snd_channel[channel].playing) if (snd_channel[channel].playing)
snd_channel[channel].envelope = ((UINT8)mgetb(m_aram+SxEV0b+i)) >> 4; snd_channel[channel].envelope = ((UINT8)mgetb(m_aram+SxEV0b+i)) >> 4;
break; break;

View File

@ -361,6 +361,7 @@ TIMER_CALLBACK_MEMBER(x68k_state::x68k_crtc_vblank_irq)
*/ */
WRITE16_MEMBER(x68k_state::x68k_crtc_w ) WRITE16_MEMBER(x68k_state::x68k_crtc_w )
{ {
if (offset < 0x24)
COMBINE_DATA(m_crtc.reg+offset); COMBINE_DATA(m_crtc.reg+offset);
switch(offset) switch(offset)
{ {