diff --git a/TMessagesProj/src/main/java/xyz/nextalone/nnngram/utils/StringUtils.kt b/TMessagesProj/src/main/java/xyz/nextalone/nnngram/utils/StringUtils.kt index a402a5fc5a..a589c06fec 100644 --- a/TMessagesProj/src/main/java/xyz/nextalone/nnngram/utils/StringUtils.kt +++ b/TMessagesProj/src/main/java/xyz/nextalone/nnngram/utils/StringUtils.kt @@ -126,7 +126,7 @@ object StringUtils { if (panguText.length == text.length) return Pair(panguText, entities) // processed or unnecessary var skip = 0 - for (i in 0 until text.lastIndex) { + for (i in text.indices) { if (i + skip >= panguText.length) break if (text[i] == panguText[i + skip]) continue