mirror of
https://github.com/DarkStore-3DS/Project_CTR.git
synced 2026-07-03 00:39:14 +00:00
Only extract contents marked in the CIA content index.
This commit is contained in:
@@ -102,6 +102,7 @@ void cia_save(cia_context* ctx, u32 type, u32 flags)
|
||||
chunk = (ctr_tmd_contentchunk*)(body->contentinfo + (sizeof(ctr_tmd_contentinfo) * TMD_MAX_CONTENTS));
|
||||
|
||||
for(i = 0; i < getbe16(body->contentcount); i++) {
|
||||
if(ctx->header.contentindex[i >> 3] & (0x80 >> (i & 7))) {
|
||||
sprintf(tmpname, "%s.%04x.%08x", path->pathname, getbe16(chunk->index), getbe32(chunk->id));
|
||||
fprintf(stdout, "Saving content #%04x to %s\n", getbe16(chunk->index), tmpname);
|
||||
|
||||
@@ -119,6 +120,7 @@ void cia_save(cia_context* ctx, u32 type, u32 flags)
|
||||
cia_save_blob(ctx, tmpname, offset, getbe64(chunk->size) & 0xffffffff, docrypto);
|
||||
|
||||
offset += getbe64(chunk->size) & 0xffffffff;
|
||||
}
|
||||
chunk++;
|
||||
}
|
||||
|
||||
|
||||
Executable
BIN
Binary file not shown.
Reference in New Issue
Block a user