Fixes potential index out of bounds when translating

This commit is contained in:
tom79 2017-10-09 19:26:05 +02:00
parent d6e5c6d60d
commit 9521bc931b
1 changed files with 1 additions and 1 deletions

View File

@ -762,7 +762,7 @@ public class StatusListAdapter extends BaseAdapter implements OnPostActionInterf
String key = "__u" + String.valueOf(i) + "__";
String value = matcher.group(0);
int end = matcher.end();
if (spannableString.charAt(end) == '/') {
if (spannableString.length() > end && spannableString.charAt(end) == '/') {
text = spannableString.toString().substring(0, end).
concat(spannableString.toString().substring(end+1, spannableString.length()));
}