diff --git a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeByJSonPath.kt b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeByJSonPath.kt index 60a3510c2..e6eee96ed 100644 --- a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeByJSonPath.kt +++ b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeByJSonPath.kt @@ -132,7 +132,7 @@ class AnalyzeByJSonPath { } if (results.size > 0) { if ("%" == elementsType) { - for (i in 0 until results[0].size) { + for (i in results[0].indices) { for (temp in results) { if (i < temp.size) { result.add(temp[i]) diff --git a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeByXPath.kt b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeByXPath.kt index 42e6bd9f6..4293837c7 100644 --- a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeByXPath.kt +++ b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeByXPath.kt @@ -63,7 +63,7 @@ class AnalyzeByXPath { } if (results.size > 0) { if ("%" == elementsType) { - for (i in 0 until results[0].size) { + for (i in results[0].indices) { for (temp in results) { if (i < temp.size) { jxNodes.add(temp[i]) @@ -120,7 +120,7 @@ class AnalyzeByXPath { } if (results.size > 0) { if ("%" == elementsType) { - for (i in 0 until results[0].size) { + for (i in results[0].indices) { for (temp in results) { if (i < temp.size) { result.add(temp[i])