From b2b68c3ced698a4503bb352bcbede069ea5bdca5 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sun, 25 Oct 2026 13:55:56 +1000 Subject: [PATCH] CDImageCCD: Fix LBA count including pregaps twice Track start is index 1 but length includes the pregap, so the lead-out position reported by GetTD was too late. --- src/util/cd_image_ccd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/cd_image_ccd.cpp b/src/util/cd_image_ccd.cpp index 3a5f4200a..5e18ee80a 100644 --- a/src/util/cd_image_ccd.cpp +++ b/src/util/cd_image_ccd.cpp @@ -382,7 +382,7 @@ bool CDImageCCD::OpenAndParse(const char* path, Error* error) return false; } - m_lba_count = m_tracks.back().start_lba + m_tracks.back().length; + m_lba_count = leadout_lba + plba_offset; AddLeadOutIndex(); m_path = path;