From db89743e8be39e80a64256dabb3155ac48d84d8a Mon Sep 17 00:00:00 2001 From: r09 Date: Sat, 3 Apr 2021 13:58:58 +0200 Subject: fmtowns: fix off-by-1 calculation in CDDA length (#7921) --- src/mame/drivers/fmtowns.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mame/drivers/fmtowns.cpp b/src/mame/drivers/fmtowns.cpp index 01e7fbaa195..85891a02bea 100644 --- a/src/mame/drivers/fmtowns.cpp +++ b/src/mame/drivers/fmtowns.cpp @@ -1614,7 +1614,7 @@ void towns_state::towns_cdrom_play_cdda(cdrom_image_device* device) lba2 += m_towns_cd.parameter[3] << 8; lba2 += m_towns_cd.parameter[2]; m_towns_cd.cdda_current = msf_to_lbafm(lba1); - m_towns_cd.cdda_length = msf_to_lbafm(lba2) - m_towns_cd.cdda_current; + m_towns_cd.cdda_length = msf_to_lbafm(lba2) - m_towns_cd.cdda_current + 1; m_cdda->set_cdrom(device->get_cdrom_file()); m_cdda->start_audio(m_towns_cd.cdda_current,m_towns_cd.cdda_length); -- cgit v1.2.3