From fb94a1cb48e8952981e2f9146eb90ee92a517b2e Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Sun, 7 May 2023 18:34:00 +0200 Subject: [PATCH] fix: incorrect cast of instruction --- .../loadmorebutton/bytecode/patch/HideLoadMoreButtonPatch.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/loadmorebutton/bytecode/patch/HideLoadMoreButtonPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/loadmorebutton/bytecode/patch/HideLoadMoreButtonPatch.kt index f165c04c12..b670cf6d11 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/hide/loadmorebutton/bytecode/patch/HideLoadMoreButtonPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/hide/loadmorebutton/bytecode/patch/HideLoadMoreButtonPatch.kt @@ -14,6 +14,7 @@ import app.revanced.patcher.patch.annotations.DependsOn import app.revanced.patcher.patch.annotations.Patch import app.revanced.patches.youtube.layout.hide.loadmorebutton.bytecode.fingerprints.HideLoadMoreButtonFingerprint import app.revanced.patches.youtube.layout.hide.loadmorebutton.resource.patch.HideLoadMoreButtonResourcePatch +import org.jf.dexlib2.iface.instruction.OneRegisterInstruction import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction @Patch @@ -26,7 +27,7 @@ class HideLoadMoreButtonPatch : BytecodePatch(listOf(HideLoadMoreButtonFingerpri HideLoadMoreButtonFingerprint.result?.let { it.mutableMethod.apply { val moveRegisterIndex = it.scanResult.patternScanResult!!.endIndex - val viewRegister = instruction(moveRegisterIndex).registerA + val viewRegister = instruction(moveRegisterIndex).registerA val insertIndex = moveRegisterIndex + 1 addInstruction(