fix: loop in amoled patch

This commit is contained in:
epicsampler 2022-05-22 14:34:36 +00:00 committed by GitHub
parent d61bac4f82
commit c4c86b65fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,7 +22,7 @@ class AmoledPatch : ResourcePatch() {
data.getXmlEditor("res${File.separator}values${File.separator}colors.xml").use { editor -> data.getXmlEditor("res${File.separator}values${File.separator}colors.xml").use { editor ->
val resourcesNode = editor.file.getElementsByTagName("resources").item(0) as Element 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 val node = resourcesNode.childNodes.item(i) as Element
node.nodeValue = when (node.getAttribute("name")) { node.nodeValue = when (node.getAttribute("name")) {