mirror of
https://github.com/revanced/revanced-patches
synced 2024-12-04 19:12:54 +01:00
fix: incorrect instruction offsets
This commit is contained in:
parent
4e74a800c3
commit
42a5a387da
@ -22,9 +22,10 @@ class VerticalScrollPatch : BytecodePatch(
|
|||||||
override fun execute(context: BytecodeContext): PatchResult {
|
override fun execute(context: BytecodeContext): PatchResult {
|
||||||
CanScrollVerticallyFingerprint.result?.let {
|
CanScrollVerticallyFingerprint.result?.let {
|
||||||
it.mutableMethod.apply {
|
it.mutableMethod.apply {
|
||||||
val insertIndex = it.scanResult.patternScanResult!!.endIndex
|
val moveResultIndex = it.scanResult.patternScanResult!!.endIndex
|
||||||
val moveResultRegister = instruction<OneRegisterInstruction>(insertIndex - 1).registerA
|
val moveResultRegister = instruction<OneRegisterInstruction>(moveResultIndex).registerA
|
||||||
|
|
||||||
|
val insertIndex = moveResultIndex + 1
|
||||||
addInstruction(
|
addInstruction(
|
||||||
insertIndex,
|
insertIndex,
|
||||||
"const/4 v$moveResultRegister, 0x0"
|
"const/4 v$moveResultRegister, 0x0"
|
||||||
|
Loading…
Reference in New Issue
Block a user