From e118b5486e6f5e344580ae4c551697b373d2545f Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sat, 5 Jun 2021 18:12:36 +1000 Subject: [PATCH] CDImagePPF: Fix incorrect filename saved to state --- src/common/cd_image_ppf.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common/cd_image_ppf.cpp b/src/common/cd_image_ppf.cpp index c32bd0412..50936c0f0 100644 --- a/src/common/cd_image_ppf.cpp +++ b/src/common/cd_image_ppf.cpp @@ -72,7 +72,7 @@ bool CDImagePPF::Open(const char* filename, std::unique_ptr parent_imag m_replacement_offset = parent_image->GetIndex(1).start_lba_on_disc; // copy all the stuff from the parent image - m_filename = filename; + m_filename = parent_image->GetFileName(); m_tracks = parent_image->GetTracks(); m_indices = parent_image->GetIndices(); m_parent_image = std::move(parent_image); @@ -432,9 +432,9 @@ std::unique_ptr CDImage::OverlayPPFPatch(const char* filename, std::unique_ptr parent_image, ProgressCallback* progress /* = ProgressCallback::NullProgressCallback */) { - std::unique_ptr memory_image = std::make_unique(); - if (!memory_image->Open(filename, std::move(parent_image))) + std::unique_ptr ppf_image = std::make_unique(); + if (!ppf_image->Open(filename, std::move(parent_image))) return {}; - return memory_image; + return ppf_image; }