fix deroon assert

This commit is contained in:
Michaël Banaan Ananas 2014-08-07 10:08:17 +00:00
parent 4f9e9d5837
commit 5c75b2e958

View File

@ -206,16 +206,13 @@ WRITE16_MEMBER(tecmosys_state::tecmosys_prot_data_w)
break;
case DS_SEND_CHKSUMS:
if( m_device_read_ptr >= 5 )
if( m_device_read_ptr >= 4 )
{
m_device_status = DS_DONE;
m_device_value = 0;
}
else
{
assert(m_device_read_ptr >= 0 && m_device_read_ptr < ARRAY_LENGTH(m_device_data->checksums));
m_device_value = data == m_device_data->checksums[m_device_read_ptr] ? m_device_data->checksums[m_device_read_ptr++] : 0xff;
}
break;
case DS_DONE: