From c62e9c16f0067814546cfd4e637325e34e28cc7a Mon Sep 17 00:00:00 2001 From: Tony Wasserka Date: Sun, 8 Dec 2024 20:16:52 +0100 Subject: [PATCH] PXI: Fix media type parsing for system save data archives --- source/processes/pxi_fs.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/processes/pxi_fs.cpp b/source/processes/pxi_fs.cpp index f630611..803b47d 100644 --- a/source/processes/pxi_fs.cpp +++ b/source/processes/pxi_fs.cpp @@ -886,7 +886,8 @@ static std::tuple OpenArchive(FakeThread& thread, Context& con { // System SaveData stored on NAND // TODO: Should we verify that not more than 4 bytes have been given? - auto media_type = path.Read(thread, 0); + // NOTE: Media type only considers the lowest byte. Services like CFG pass in garbage in the upper bytes. + auto media_type = path.Read(thread, 0); auto archive = std::make_unique(settings, media_type); auto archive_handle = context.next_archive_handle++; context.archives.emplace(std::make_pair(archive_handle, std::move(archive)));