Skip to content

Commit

Permalink
fix: incorrect instruction offsets
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX committed May 7, 2023
1 parent 4e74a80 commit 42a5a38
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<OneRegisterInstruction>(insertIndex - 1).registerA
val moveResultIndex = it.scanResult.patternScanResult!!.endIndex
val moveResultRegister = instruction<OneRegisterInstruction>(moveResultIndex).registerA

val insertIndex = moveResultIndex + 1
addInstruction(
insertIndex,
"const/4 v$moveResultRegister, 0x0"
Expand Down

0 comments on commit 42a5a38

Please sign in to comment.