mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 05:32:47 +00:00
Properly verify CFA NCCHs
Also fixes NCSD verification
This commit is contained in:
parent
cbe473450f
commit
a05cc1ff56
@ -318,11 +318,18 @@ u32 VerifyNcchFile(const char* path, u32 offset, u32 size) {
|
||||
return 1;
|
||||
|
||||
fvx_lseek(&file, offset);
|
||||
if (GetNcchHeaders(&ncch, &exthdr, NULL, &file) != 0) {
|
||||
if (GetNcchHeaders(&ncch, NULL, NULL, &file) != 0) {
|
||||
if (!offset) ShowPrompt(false, "%s\nError: Not a NCCH file", pathstr);
|
||||
fvx_close(&file);
|
||||
return 1;
|
||||
}
|
||||
|
||||
fvx_lseek(&file, offset);
|
||||
if (ncch.size_exthdr && (GetNcchHeaders(&ncch, &exthdr, NULL, &file) != 0)) {
|
||||
if (!offset) ShowPrompt(false, "%s\nError: Missing ExtHeader", pathstr);
|
||||
fvx_close(&file);
|
||||
return 1;
|
||||
}
|
||||
|
||||
fvx_lseek(&file, offset);
|
||||
if (ncch.size_exefs && (GetNcchHeaders(&ncch, NULL, &exefs, &file) != 0)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user