From d257b6d193dbd98b89c1e3cdb7f9465d13583478 Mon Sep 17 00:00:00 2001 From: OxrxL <108184954+OxrxL@users.noreply.github.com> Date: Sun, 14 Aug 2022 23:35:24 +0200 Subject: [PATCH] fix: decode bytebuffer properly (#121) --- .../revanced/integrations/patches/GeneralBytecodeAdsPatch.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/app/revanced/integrations/patches/GeneralBytecodeAdsPatch.java b/app/src/main/java/app/revanced/integrations/patches/GeneralBytecodeAdsPatch.java index 42fc6d90..a874d98c 100644 --- a/app/src/main/java/app/revanced/integrations/patches/GeneralBytecodeAdsPatch.java +++ b/app/src/main/java/app/revanced/integrations/patches/GeneralBytecodeAdsPatch.java @@ -61,7 +61,7 @@ public class GeneralBytecodeAdsPatch { bufferBlockList.add("YouTube Movies"); } if (containsAny(value, "home_video_with_context", "related_video_with_context") && - bufferBlockList.stream().anyMatch(StandardCharsets.UTF_8.decode(buffer).toString()::contains) + bufferBlockList.stream().anyMatch(new String(buffer.array(), StandardCharsets.UTF_8)::contains) ) return true; if (SettingsEnum.ADREMOVER_COMMENTS_REMOVAL.getBoolean()) {