From 353c538c6bc0adc0f8abe45e86789d9bcfa85a78 Mon Sep 17 00:00:00 2001 From: Alex Barney Date: Tue, 14 May 2019 17:03:53 -0500 Subject: [PATCH] Properly handle opening patch NCAs with an empty base section --- src/LibHac/Fs/NcaUtils/Nca.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LibHac/Fs/NcaUtils/Nca.cs b/src/LibHac/Fs/NcaUtils/Nca.cs index 420e615e..9d8c4675 100644 --- a/src/LibHac/Fs/NcaUtils/Nca.cs +++ b/src/LibHac/Fs/NcaUtils/Nca.cs @@ -181,7 +181,7 @@ namespace LibHac.Fs.NcaUtils public IStorage OpenRawStorageWithPatch(Nca patchNca, int index) { IStorage patchStorage = patchNca.OpenRawStorage(index); - IStorage baseStorage = OpenRawStorage(index); + IStorage baseStorage = SectionExists(index) ? OpenRawStorage(index) : new NullStorage(); NcaFsHeader header = patchNca.Header.GetFsHeader(index); NcaFsPatchInfo patchInfo = header.GetPatchInfo();