Fix possible crash when dealing with synchronized lyrics

This commit is contained in:
vfsfitvnm
2022-08-03 22:00:57 +02:00
parent 9e839feef3
commit 4282c5265a

View File

@@ -18,7 +18,7 @@ class SynchronizedLyrics(text: String, private val positionProvider: () -> Long)
if (item.first >= positionProvider()) break if (item.first >= positionProvider()) break
index++ index++
} }
return index return if (index == -1) 0 else index
} }
fun update(): Boolean { fun update(): Boolean {