mirror of
https://github.com/DarkStore-3DS/Project_CTR.git
synced 2026-07-03 00:39:14 +00:00
ctrtool: updated exefs/ncch code
Added support for reading/verifying/extracting exefs from CFA.
This commit is contained in:
+1
-1
@@ -129,7 +129,7 @@ void exefs_save(exefs_context* ctx, u32 index, u32 flags)
|
||||
ctr_init_counter(&ctx->aes, ctx->key, ctx->counter);
|
||||
ctr_add_counter(&ctx->aes, offset / 0x10);
|
||||
|
||||
if (index == 0 && ctx->compressedflag && ((flags & RawFlag) == 0))
|
||||
if (strncmp(name,".code",5) == 0 && ctx->compressedflag && ((flags & RawFlag) == 0))
|
||||
{
|
||||
fprintf(stdout, "Decompressing section %s to %s...\n", name, outfname);
|
||||
|
||||
|
||||
+1
-1
@@ -366,7 +366,7 @@ void ncch_process(ncch_context* ctx, u32 actions)
|
||||
result = exheader_process(&ctx->exheader, actions);
|
||||
}
|
||||
|
||||
if (result && ncch_get_exheader_size(ctx))
|
||||
if (result && ncch_get_exefs_size(ctx))
|
||||
{
|
||||
exefs_set_compressedflag(&ctx->exefs, exheader_get_compressedflag(&ctx->exheader));
|
||||
exefs_process(&ctx->exefs, actions);
|
||||
|
||||
Reference in New Issue
Block a user