From c4c86b65fd8b2463c1d86ad2e46ec9f08e60d47c Mon Sep 17 00:00:00 2001 From: epicsampler <102923070+epicsampler@users.noreply.github.com> Date: Sun, 22 May 2022 14:34:36 +0000 Subject: [PATCH] fix: loop in `amoled` patch --- .../revanced/patches/youtube/layout/amoled/patch/AmoledPatch.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/amoled/patch/AmoledPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/amoled/patch/AmoledPatch.kt index 1ecf1a544..e9d950ea1 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/amoled/patch/AmoledPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/amoled/patch/AmoledPatch.kt @@ -22,7 +22,7 @@ class AmoledPatch : ResourcePatch() { data.getXmlEditor("res${File.separator}values${File.separator}colors.xml").use { editor -> val resourcesNode = editor.file.getElementsByTagName("resources").item(0) as Element - for (i in 0..resourcesNode.childNodes.length) { + for (i in 0 until resourcesNode.childNodes.length) { val node = resourcesNode.childNodes.item(i) as Element node.nodeValue = when (node.getAttribute("name")) {