diff --git a/source/core/pfs.c b/source/core/pfs.c index cb4f7ec..0595ad4 100644 --- a/source/core/pfs.c +++ b/source/core/pfs.c @@ -35,7 +35,7 @@ bool pfsInitializeContext(PartitionFileSystemContext *out, NcaFsSectionContext * bool success = false, dump_fs_header = false; - if (!out || !nca_fs_ctx || !nca_fs_ctx->enabled || nca_fs_ctx->section_type != NcaFsSectionType_PartitionFs || \ + if (!out || !nca_fs_ctx || !nca_fs_ctx->enabled || nca_fs_ctx->has_sparse_layer || nca_fs_ctx->section_type != NcaFsSectionType_PartitionFs || \ (nca_fs_ctx->hash_type != NcaHashType_HierarchicalSha256 && nca_fs_ctx->hash_type != NcaHashType_HierarchicalSha3256) || !(nca_ctx = (NcaContext*)nca_fs_ctx->nca_ctx) || \ (nca_ctx->rights_id_available && !nca_ctx->titlekey_retrieved)) { diff --git a/source/core/romfs.c b/source/core/romfs.c index e99a48e..3d6b440 100644 --- a/source/core/romfs.c +++ b/source/core/romfs.c @@ -33,7 +33,7 @@ bool romfsInitializeContext(RomFileSystemContext *out, NcaFsSectionContext *nca_ u64 dir_table_offset = 0, file_table_offset = 0; bool success = false, dump_fs_header = false; - if (!out || !nca_fs_ctx || !nca_fs_ctx->enabled || !(nca_ctx = (NcaContext*)nca_fs_ctx->nca_ctx) || \ + if (!out || !nca_fs_ctx || !nca_fs_ctx->enabled || nca_fs_ctx->has_sparse_layer || !(nca_ctx = (NcaContext*)nca_fs_ctx->nca_ctx) || \ (nca_ctx->format_version == NcaVersion_Nca0 && (nca_fs_ctx->section_type != NcaFsSectionType_Nca0RomFs || nca_fs_ctx->hash_type != NcaHashType_HierarchicalSha256)) || \ (nca_ctx->format_version != NcaVersion_Nca0 && (nca_fs_ctx->section_type != NcaFsSectionType_RomFs || \ (nca_fs_ctx->hash_type != NcaHashType_HierarchicalIntegrity && nca_fs_ctx->hash_type != NcaHashType_HierarchicalIntegritySha3))) || \