mirror of
https://github.com/revanced/revanced-patches
synced 2024-09-04 05:26:14 +02:00
fix(Duolingo - Unlock Super): Get correct instruction offset (#3023)
This commit is contained in:
parent
0e0b73521c
commit
5146de872a
@ -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 New Issue
Block a user