From a5023524d8ff033ecb86bd5e07f69f8a80d412f2 Mon Sep 17 00:00:00 2001 From: drobotk Date: Tue, 24 Feb 2026 12:39:18 +0100 Subject: [PATCH] fix: crunchyroll --- .../app/revanced/patches/crunchyroll/ads/HideAdsPatch.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/patches/src/main/kotlin/app/revanced/patches/crunchyroll/ads/HideAdsPatch.kt b/patches/src/main/kotlin/app/revanced/patches/crunchyroll/ads/HideAdsPatch.kt index 718d9fdc6e..3a697c3b75 100644 --- a/patches/src/main/kotlin/app/revanced/patches/crunchyroll/ads/HideAdsPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/crunchyroll/ads/HideAdsPatch.kt @@ -18,11 +18,11 @@ val hideAdsPatch = bytecodePatch("Hide ads") { apply { // Get obfuscated "enableAds" field from toString method. - val enableAdsField = videoUrlReadyToStringMethodMatch.method.apply { + val enableAdsField = videoUrlReadyToStringMethodMatch.method.let { val stringIndex = videoUrlReadyToStringMethodMatch[-1] - val fieldIndex = indexOfFirstInstruction(stringIndex, Opcode.IGET_BOOLEAN) + val fieldIndex = it.indexOfFirstInstruction(stringIndex, Opcode.IGET_BOOLEAN) - getInstruction(fieldIndex).getReference()!! + it.getInstruction(fieldIndex).getReference()!! } // Remove final access flag on field.