Skip to content

Commit

Permalink
fix: incorrect cast of instruction
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX committed May 7, 2023
1 parent 4347f88 commit fb94a1c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -26,7 +27,7 @@ class HideLoadMoreButtonPatch : BytecodePatch(listOf(HideLoadMoreButtonFingerpri
HideLoadMoreButtonFingerprint.result?.let {
it.mutableMethod.apply {
val moveRegisterIndex = it.scanResult.patternScanResult!!.endIndex
val viewRegister = instruction<TwoRegisterInstruction>(moveRegisterIndex).registerA
val viewRegister = instruction<OneRegisterInstruction>(moveRegisterIndex).registerA

val insertIndex = moveRegisterIndex + 1
addInstruction(
Expand Down

0 comments on commit fb94a1c

Please sign in to comment.