pull/60/head
kunfei 5 years ago
parent 3002eac71c
commit 632f3066a7
  1. 4
      app/src/main/java/io/legado/app/ui/widget/page/TextChapter.kt

@ -54,8 +54,8 @@ data class TextChapter(
fun getReadLength(pageIndex: Int): Int { fun getReadLength(pageIndex: Int): Int {
var length = 0 var length = 0
val maxIndex = min(pageIndex, pageLines.lastIndex) val maxIndex = min(pageIndex, pageLines.size)
for (index in 0..maxIndex) { for (index in 0 until maxIndex) {
length += pageLengths[index] length += pageLengths[index]
} }
return length return length

Loading…
Cancel
Save