fix: don't overwrite register in compact-header patch (#406)

This commit is contained in:
Canny 2022-08-30 19:35:41 +03:00 committed by GitHub
parent ff8603d118
commit 3da8ab5702
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -31,8 +31,8 @@ class CompactHeaderPatch : BytecodePatch(
val register = (method.implementation!!.instructions[insertIndex - 1] as BuilderInstruction11x).registerA
method.addInstructions(
insertIndex, """
const/16 v0, 0x8
invoke-virtual {v${register}, v0}, Landroid/view/View;->setVisibility(I)V
const/16 v2, 0x8
invoke-virtual {v${register}, v2}, Landroid/view/View;->setVisibility(I)V
"""
)