From cb73b58dcba37236fd5f91076d055d39732cf94c Mon Sep 17 00:00:00 2001 From: kunfei Date: Thu, 26 Mar 2020 22:21:04 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/legado/app/model/localBook/AnalyzeTxtFile.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/model/localBook/AnalyzeTxtFile.kt b/app/src/main/java/io/legado/app/model/localBook/AnalyzeTxtFile.kt index d5d56851e..baecb9a57 100644 --- a/app/src/main/java/io/legado/app/model/localBook/AnalyzeTxtFile.kt +++ b/app/src/main/java/io/legado/app/model/localBook/AnalyzeTxtFile.kt @@ -64,7 +64,7 @@ class AnalyzeTxtFile { blockPos++ //如果存在Chapter if (rulePattern != null) { //将数据转换成String - var blockContent = String(buffer, charset) + var blockContent = String(buffer, 0, length, charset) val lastN = blockContent.lastIndexOf("\n") if (lastN > 0) { blockContent = blockContent.substring(0, lastN)