From c862959e3fdd2095ee90051dfef3775f42057b16 Mon Sep 17 00:00:00 2001 From: kosyak Date: Wed, 27 Dec 2023 01:11:08 +0100 Subject: [PATCH] fix crash --- .../java/eu/siacs/conversations/ui/adapter/MessageAdapter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java index 282066e13..16bf0e228 100644 --- a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java +++ b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java @@ -540,9 +540,10 @@ public class MessageAdapter extends ArrayAdapter { end = quirk.length(); } else if (start == -1) { start = 0; - } else if (end == -1) { + } else if (end == -1 || end >= body.length()) { end = body.length(); } + applyQuoteSpan(body, start, end, darkBackground, true, message); } return startsWithQuote;