CDImage: Fix tracks not getting brought across in CopyTOC()

This commit is contained in:
Connor McLaughlin 2021-11-05 15:19:21 +10:00
parent 643dcb0a39
commit 425dee2f0b

View file

@ -338,8 +338,10 @@ void CDImage::ClearTOC()
void CDImage::CopyTOC(const CDImage* image)
{
m_lba_count = image->m_lba_count;
m_indices.clear();
decltype(m_indices)().swap(m_indices);
decltype(m_tracks)().swap(m_tracks);
m_indices.reserve(image->m_indices.size());
m_tracks.reserve(image->m_tracks.size());
// Damn bitfield copy constructor...
for (const Index& index : image->m_indices)