nca: Fix NCA0 romfs saving/listing (#107)

The behavior in nca.c was broken (while the one in nca0_romfs.c is fine, making it possible to extract when standalone)
This commit is contained in:
substanc3 2021-07-11 00:03:05 +02:00 committed by GitHub
parent a4f49bfeac
commit c2c907430e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

4
nca.c
View file

@ -1697,11 +1697,11 @@ static int nca_visit_nca0_romfs_dir(nca_section_ctx_t *ctx, uint32_t dir_offset,
any_files |= nca_visit_nca0_romfs_file(ctx, entry->file, cur_path);
}
if (entry->child != ROMFS_ENTRY_EMPTY) {
any_files |= nca_visit_nca0_romfs_file(ctx, entry->child, cur_path);
any_files |= nca_visit_nca0_romfs_dir(ctx, entry->child, cur_path);
}
if (entry->sibling != ROMFS_ENTRY_EMPTY) {
nca_visit_nca0_romfs_dir(ctx, entry->sibling, parent_path);
any_files |= nca_visit_nca0_romfs_dir(ctx, entry->sibling, parent_path);
}
free(cur_path);