vgmplay: fixed off by one error that caused a bogus error to be flagged up [smf]

This commit is contained in:
smf- 2018-09-20 18:22:25 +01:00
parent 47ed7d9b13
commit ee4b6da096

View File

@ -825,7 +825,7 @@ uint32_t vgmplay_device::handle_pcm_write(uint32_t address)
int second = (type & 0x80) ? 1 : 0;
type &= 0x7f;
if (m_data_streams.size() <= type || m_data_streams[type].size() <= src + size)
if (m_data_streams.size() <= type || m_data_streams[type].size() < src + size)
osd_printf_error("invalid pcm ram writes src %x dst %x size %x type %02x\n", src, dst, size, type);
else if (type == 0x01 && !second)
{