feat: 优化代码

pull/178/head
kunfei 5 years ago
parent 40a787811b
commit cb73b58dcb
  1. 2
      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)

Loading…
Cancel
Save