fix: incorrect cast of instruction
This commit is contained in:
parent
4347f88af0
commit
fb94a1cb48
|
@ -14,6 +14,7 @@ import app.revanced.patcher.patch.annotations.DependsOn
|
||||||
import app.revanced.patcher.patch.annotations.Patch
|
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.bytecode.fingerprints.HideLoadMoreButtonFingerprint
|
||||||
import app.revanced.patches.youtube.layout.hide.loadmorebutton.resource.patch.HideLoadMoreButtonResourcePatch
|
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
|
import org.jf.dexlib2.iface.instruction.TwoRegisterInstruction
|
||||||
|
|
||||||
@Patch
|
@Patch
|
||||||
|
@ -26,7 +27,7 @@ class HideLoadMoreButtonPatch : BytecodePatch(listOf(HideLoadMoreButtonFingerpri
|
||||||
HideLoadMoreButtonFingerprint.result?.let {
|
HideLoadMoreButtonFingerprint.result?.let {
|
||||||
it.mutableMethod.apply {
|
it.mutableMethod.apply {
|
||||||
val moveRegisterIndex = it.scanResult.patternScanResult!!.endIndex
|
val moveRegisterIndex = it.scanResult.patternScanResult!!.endIndex
|
||||||
val viewRegister = instruction<TwoRegisterInstruction>(moveRegisterIndex).registerA
|
val viewRegister = instruction<OneRegisterInstruction>(moveRegisterIndex).registerA
|
||||||
|
|
||||||
val insertIndex = moveRegisterIndex + 1
|
val insertIndex = moveRegisterIndex + 1
|
||||||
addInstruction(
|
addInstruction(
|
||||||
|
|
Loading…
Reference in a new issue