XEP-0393: fix off-by-one error in block detector ('``ii``ii')

Georg Lukas created

Change summary

src/main/java/eu/siacs/conversations/utils/ImStyleParser.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Detailed changes

src/main/java/eu/siacs/conversations/utils/ImStyleParser.java 🔗

@@ -72,7 +72,7 @@ public class ImStyleParser {
 	}
 
 	private static boolean isCharRepeatedTwoTimes(CharSequence text, char c, int index, int end) {
-		return index + 1 <= end && text.charAt(index) == c && text.charAt(index) == c;
+		return index + 1 <= end && text.charAt(index) == c && text.charAt(index+1) == c;
 	}
 
 	private static boolean precededByWhiteSpace(CharSequence text, int index, int start) {