diff --git a/sysmodules/loader/source/patcher.c b/sysmodules/loader/source/patcher.c index 0a3970a..9e13cc0 100644 --- a/sysmodules/loader/source/patcher.c +++ b/sysmodules/loader/source/patcher.c @@ -530,7 +530,7 @@ static inline bool patchLayeredFs(u64 progId, u8 *code, u32 size, u32 textSize, romfsRedirPatchSubstituted1 = *(u32 *)(code + fsOpenFileDirectly); romfsRedirPatchHook1 = MAKE_BRANCH(payloadOffset + (u32)&romfsRedirPatchHook1 - (u32)romfsRedirPatch, fsOpenFileDirectly + 4); - romfsRedirPatchSubstituted1 = *(u32 *)(code + fsTryOpenFile); + romfsRedirPatchSubstituted2 = *(u32 *)(code + fsTryOpenFile); romfsRedirPatchHook2 = MAKE_BRANCH(payloadOffset + (u32)&romfsRedirPatchHook2 - (u32)romfsRedirPatch, fsTryOpenFile + 4); romfsRedirPatchCustomPath = pathAddress; romfsRedirPatchFsMountArchive = 0x100000 + fsMountArchive; diff --git a/sysmodules/loader/source/romfsredir.s b/sysmodules/loader/source/romfsredir.s index b31a3dd..20e9f64 100644 --- a/sysmodules/loader/source/romfsredir.s +++ b/sysmodules/loader/source/romfsredir.s @@ -23,7 +23,7 @@ romfsRedirPatch: .word 0xdead0002 @ Substituted opcode .global romfsRedirPatchHook2 romfsRedirPatchHook2: - .word 0xdead0002 @ Branch to hooked function + .word 0xdead0003 @ Branch to hooked function @ Mounts the archive and registers it as 'lf:' mountArchive: @@ -31,7 +31,7 @@ romfsRedirPatch: bne romfsRedirPatchSubstituted1 stmfd sp!, {r0-r4, lr} sub sp, sp, #4 - adr r1, romfsRedirPatchArchiveId + ldr r1, romfsRedirPatchArchiveId mov r0, sp ldr r4, romfsRedirPatchFsMountArchive blx r4