Skip to content

Commit

Permalink
优化
Browse files Browse the repository at this point in the history
  • Loading branch information
821938089 committed Jan 1, 2024
1 parent 8f07d73 commit b4626e8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/src/main/java/io/legado/app/model/localBook/TextFile.kt
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ class TextFile(private var book: Book) {
val count = (end - start).toInt()
val buffer = ByteArray(count)

if (bufferEnd in start..end || bufferStart in start..end) {
@Suppress("ConvertTwoComparisonsToRangeCheck")
if (start < bufferEnd && end > bufferEnd || start < bufferStart && end > bufferStart) {
/** 章节内容在缓冲区交界处 */
LocalBook.getBookInputStream(book).use { bis ->
bis.skip(start)
Expand Down

0 comments on commit b4626e8

Please sign in to comment.