1
0
Fork 1

This should never happen but crash logs say it do

Not colouring is better than crashing

(cherry picked from commit 3725dba15881df3fe7c26c40204bf48f8d8d02b0)
This commit is contained in:
Stephen Paul Weber 2024-11-18 10:15:12 -05:00 committed by Arne
parent 22774ec01f
commit 42c22a4c05

View file

@ -94,7 +94,9 @@ public class IrregularUnicodeDetector {
String[] labels = jid.getDomain().toEscapedString().split("\\.");
for (int i = 0; i < labels.length; ++i) {
SpannableString spannableString = new SpannableString(labels[i]);
colorize(spannableString, patternTuple.domain.get(i), color);
if (patternTuple.domain.size() > i) {
colorize(spannableString, patternTuple.domain.get(i), color);
}
if (i != 0) {
builder.append('.');
}