mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2024-11-10 01:01:56 +01:00
fix(Duolingo - Unlock Super): Get correct instruction offset (#3023)
This commit is contained in:
parent
0e0b73521c
commit
5146de872a
1 changed files with 2 additions and 2 deletions
|
@ -54,8 +54,8 @@ object UnlockDuolingoSuperPatch : BytecodePatch(
|
|||
}
|
||||
|
||||
private fun MutableMethod.indexOfReference(reference: Reference) = getInstructions()
|
||||
.filterIsInstance<BuilderInstruction22c>()
|
||||
.filter { it.opcode == Opcode.IPUT_BOOLEAN }.indexOfFirst { it.reference == reference }.let {
|
||||
.indexOfFirst { it is BuilderInstruction22c && it.opcode == Opcode.IPUT_BOOLEAN && it.reference == reference }
|
||||
.let {
|
||||
if (it == -1) throw PatchException("Could not find index of instruction with supplied reference.")
|
||||
else it
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue