From 0dc8604b6c875612a075fca75a5715ed98894308 Mon Sep 17 00:00:00 2001 From: bushixuanqi <57338301+bushixuanqi@users.noreply.github.com> Date: Mon, 5 Jul 2021 12:31:35 +0800 Subject: [PATCH] Update RuleAnalyzer.kt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修正两个逻辑错误 --- .../main/java/io/legado/app/model/analyzeRule/RuleAnalyzer.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/model/analyzeRule/RuleAnalyzer.kt b/app/src/main/java/io/legado/app/model/analyzeRule/RuleAnalyzer.kt index c1680e16b..e72d7e680 100644 --- a/app/src/main/java/io/legado/app/model/analyzeRule/RuleAnalyzer.kt +++ b/app/src/main/java/io/legado/app/model/analyzeRule/RuleAnalyzer.kt @@ -277,7 +277,7 @@ class RuleAnalyzer(data: String) { if(st == -1) { - var rule = arrayOf(queue.substring(0, pos)) //压入分隔的首段规则到数组 + var rule = arrayOf(queue.substring(start, pos)) //压入分隔的首段规则到数组 elementsType = queue.substring(pos, pos + step) //设置组合类型 pos += step //跳过分隔符 @@ -294,7 +294,7 @@ class RuleAnalyzer(data: String) { val rule = if(st >pos ){ //先匹配到st1pos,表明分隔字串不在选择器中,将选择器前分隔字串分隔的字段依次压入数组 - var rule = arrayOf(queue.substring(0, pos)) //压入分隔的首段规则到数组 + var rule = arrayOf(queue.substring(start, pos)) //压入分隔的首段规则到数组 elementsType = queue.substring(pos, pos + step) //设置组合类型 pos += step //跳过分隔符