diff --git a/src/common/cd_image_chd.cpp b/src/common/cd_image_chd.cpp index d4e78fd5b..9182ffec1 100644 --- a/src/common/cd_image_chd.cpp +++ b/src/common/cd_image_chd.cpp @@ -199,7 +199,7 @@ bool CDImageCHD::Open(const char* filename) // add the track itself m_tracks.push_back(Track{static_cast(track_num), disc_lba, static_cast(m_indices.size()), - static_cast(frames), mode.value(), control}); + static_cast(frames + pregap_frames), mode.value(), control}); // how many indices in this track? Index index = {}; diff --git a/src/common/cd_image_cue.cpp b/src/common/cd_image_cue.cpp index 689ae8c5b..a6c3e56d5 100644 --- a/src/common/cd_image_cue.cpp +++ b/src/common/cd_image_cue.cpp @@ -158,7 +158,7 @@ bool CDImageCueSheet::OpenAndParse(const char* filename) // add the track itself m_tracks.push_back(Track{static_cast(track_num), disc_lba, static_cast(m_indices.size()), - static_cast(track_length), mode, control}); + static_cast(track_length + pregap_frames), mode, control}); // how many indices in this track? Index last_index;