diff --git a/rpcs3/Emu/System.cpp b/rpcs3/Emu/System.cpp index 7ff37d1920..eb3734ffc6 100644 --- a/rpcs3/Emu/System.cpp +++ b/rpcs3/Emu/System.cpp @@ -715,18 +715,21 @@ bool Emulator::BootRsxCapture(const std::string& path) std::unique_ptr frame = std::make_unique(); utils::serial load; - load.m_file_handler = make_uncompressed_serialization_file_handler(std::move(in_file)); load.set_reading_state(); if (fmt::to_lower(path).ends_with(".gz")) { - load.data = unzip(load.data); + load.data = unzip(in_file.to_vector()); if (load.data.empty()) { sys_log.error("Failed to unzip rsx capture file!"); return false; } } + else + { + load.m_file_handler = make_uncompressed_serialization_file_handler(std::move(in_file)); + } load(*frame); in_file.close(); diff --git a/rpcs3/Emu/savestate_utils.cpp b/rpcs3/Emu/savestate_utils.cpp index 13e8ddd525..65e2b642ed 100644 --- a/rpcs3/Emu/savestate_utils.cpp +++ b/rpcs3/Emu/savestate_utils.cpp @@ -108,7 +108,7 @@ std::vector> get_savestate_versioning_data(fs::file&& file) u64 offs = 0; file.read(offs); - const usz fsize = file.size(); + const usz fsize = file.size(); if (!offs || fsize <= offs) { diff --git a/rpcs3/util/serialization.hpp b/rpcs3/util/serialization.hpp index 542f84e462..f52e3a17ba 100644 --- a/rpcs3/util/serialization.hpp +++ b/rpcs3/util/serialization.hpp @@ -453,7 +453,7 @@ namespace utils const usz end_pos = pos + sizeof(T); const usz size = get_size(end_pos); - using type = std::remove_const_t; + using type = std::remove_const_t; if (size >= end_pos) {