diff --git a/src/main/kotlin/app/revanced/patches/shared/misc/fix/verticalscroll/patch/VerticalScrollPatch.kt b/src/main/kotlin/app/revanced/patches/shared/misc/fix/verticalscroll/patch/VerticalScrollPatch.kt index 1096e7fe3b..296ba4e289 100644 --- a/src/main/kotlin/app/revanced/patches/shared/misc/fix/verticalscroll/patch/VerticalScrollPatch.kt +++ b/src/main/kotlin/app/revanced/patches/shared/misc/fix/verticalscroll/patch/VerticalScrollPatch.kt @@ -22,9 +22,10 @@ class VerticalScrollPatch : BytecodePatch( override fun execute(context: BytecodeContext): PatchResult { CanScrollVerticallyFingerprint.result?.let { it.mutableMethod.apply { - val insertIndex = it.scanResult.patternScanResult!!.endIndex - val moveResultRegister = instruction(insertIndex - 1).registerA + val moveResultIndex = it.scanResult.patternScanResult!!.endIndex + val moveResultRegister = instruction(moveResultIndex).registerA + val insertIndex = moveResultIndex + 1 addInstruction( insertIndex, "const/4 v$moveResultRegister, 0x0"