diff --git a/revanced-patcher/src/main/kotlin/app/revanced/patcher/Patcher.kt b/revanced-patcher/src/main/kotlin/app/revanced/patcher/Patcher.kt index 87b2218..3128b20 100644 --- a/revanced-patcher/src/main/kotlin/app/revanced/patcher/Patcher.kt +++ b/revanced-patcher/src/main/kotlin/app/revanced/patcher/Patcher.kt @@ -183,7 +183,7 @@ class Patcher( // TODO: Implement this in a more polymorphic way. when (patch) { is BytecodePatch -> { - patch.fingerprints.toList().resolveUsingLookupMap(context.bytecodeContext) + patch.fingerprints.resolveUsingLookupMap(context.bytecodeContext) patch.execute(context.bytecodeContext) } is ResourcePatch -> { diff --git a/revanced-patcher/src/main/kotlin/app/revanced/patcher/fingerprint/method/impl/MethodFingerprint.kt b/revanced-patcher/src/main/kotlin/app/revanced/patcher/fingerprint/method/impl/MethodFingerprint.kt index 3682a02..bb223bf 100644 --- a/revanced-patcher/src/main/kotlin/app/revanced/patcher/fingerprint/method/impl/MethodFingerprint.kt +++ b/revanced-patcher/src/main/kotlin/app/revanced/patcher/fingerprint/method/impl/MethodFingerprint.kt @@ -159,9 +159,12 @@ abstract class MethodFingerprint( * - Faster: Specify [accessFlags], [returnType] and [parameters]. * - Fastest: Specify [strings], with at least one string being an exact (non-partial) match. */ - internal fun List.resolveUsingLookupMap(context: BytecodeContext) { + internal fun Set.resolveUsingLookupMap(context: BytecodeContext) { if (methods.isEmpty()) throw PatchException("lookup map not initialized") + forEach { fingerprint -> + fingerprint.resolveUsingLookupMap(context) + } for (fingerprint in this) { fingerprint.resolveUsingLookupMap(context) }