mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 05:32:47 +00:00
Don't verify ExeFS for Process9
This commit is contained in:
parent
d714d580e8
commit
79a3bfc9e1
@ -302,6 +302,7 @@ u32 VerifyTmdContent(const char* path, u64 offset, TmdContentChunk* chunk, const
|
|||||||
|
|
||||||
u32 VerifyNcchFile(const char* path, u32 offset, u32 size) {
|
u32 VerifyNcchFile(const char* path, u32 offset, u32 size) {
|
||||||
NcchHeader ncch;
|
NcchHeader ncch;
|
||||||
|
NcchExtHeader exthdr;
|
||||||
ExeFsHeader exefs;
|
ExeFsHeader exefs;
|
||||||
FIL file;
|
FIL file;
|
||||||
|
|
||||||
@ -313,7 +314,7 @@ u32 VerifyNcchFile(const char* path, u32 offset, u32 size) {
|
|||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
fvx_lseek(&file, offset);
|
fvx_lseek(&file, offset);
|
||||||
if (GetNcchHeaders(&ncch, NULL, NULL, &file) != 0) {
|
if (GetNcchHeaders(&ncch, &exthdr, NULL, &file) != 0) {
|
||||||
if (!offset) ShowPrompt(false, "%s\nError: Not a NCCH file", pathstr);
|
if (!offset) ShowPrompt(false, "%s\nError: Not a NCCH file", pathstr);
|
||||||
fvx_close(&file);
|
fvx_close(&file);
|
||||||
return 1;
|
return 1;
|
||||||
@ -363,8 +364,8 @@ u32 VerifyNcchFile(const char* path, u32 offset, u32 size) {
|
|||||||
ver_romfs = CheckNcchHash(ncch.hash_romfs, &file, ncch.size_romfs_hash * NCCH_MEDIA_UNIT, offset, &ncch, NULL);
|
ver_romfs = CheckNcchHash(ncch.hash_romfs, &file, ncch.size_romfs_hash * NCCH_MEDIA_UNIT, offset, &ncch, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
// thorough exefs verification
|
// thorough exefs verification (workaround for Process9)
|
||||||
if (ncch.size_exefs > 0) {
|
if ((ncch.size_exefs > 0) && (memcmp(exthdr.name, "Process9", 8) != 0)) {
|
||||||
for (u32 i = 0; !ver_exefs && (i < 10); i++) {
|
for (u32 i = 0; !ver_exefs && (i < 10); i++) {
|
||||||
ExeFsFileHeader* exefile = exefs.files + i;
|
ExeFsFileHeader* exefile = exefs.files + i;
|
||||||
u8* hash = exefs.hashes[9 - i];
|
u8* hash = exefs.hashes[9 - i];
|
||||||
|
29
data/testbug.gm9
Normal file
29
data/testbug.gm9
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
@MainMenu
|
||||||
|
labelsel -s -o "Main Menu" MainMenu_*
|
||||||
|
goto MainMenu
|
||||||
|
|
||||||
|
@MainMenu_Option1
|
||||||
|
labelsel -s -o "Option 1 Sub-Menu" MainMenu_Option1_*
|
||||||
|
goto MainMenu
|
||||||
|
|
||||||
|
@MainMenu_Option1_A
|
||||||
|
echo "This is Option 1 A"
|
||||||
|
goto MainMenu_Option1
|
||||||
|
|
||||||
|
@MainMenu_Option1_B
|
||||||
|
echo "This is Option 1 B"
|
||||||
|
goto MainMenu_Option1
|
||||||
|
|
||||||
|
@MainMenu_Option2
|
||||||
|
echo "This is Option 2"
|
||||||
|
goto MainMenu
|
||||||
|
|
||||||
|
@MainMenu_Option3
|
||||||
|
echo "This is Option 3"
|
||||||
|
goto MainMenu
|
||||||
|
|
||||||
|
@MainMenu_Reboot
|
||||||
|
reboot
|
||||||
|
|
||||||
|
@MainMenu_Shutdown
|
||||||
|
poweroff
|
Loading…
x
Reference in New Issue
Block a user