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

View File

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