Fix issue #54 - Crash with index

This commit is contained in:
Thomas 2022-05-16 17:35:31 +02:00
parent de80c5b914
commit b6f8dbf1ce

View file

@ -184,8 +184,8 @@ public class SpannableHelper {
if (matchEnd > content.toString().length()) {
matchEnd = content.toString().length();
}
if (content.toString().length() > matchEnd) {
matchEnd = content.toString().length();
if (content.toString().length() > matchEnd || matchStart < 0) {
continue;
}
final String url = content.toString().substring(matchStart, matchEnd);
String newURL = Helper.transformURL(context, url);